diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 02:00:28 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 03:22:29 +0200 |
commit | 0349b81a10d2937897f30031c4dedb49aa132d8c (patch) | |
tree | 3db2827cd64888cc013e064d4e201b8a6ddbc7a9 /pyload/network/XDCCRequest.py | |
parent | Merge pull request #12 from GammaC0de/GammaC0de-fix-api (diff) | |
download | pyload-0349b81a10d2937897f30031c4dedb49aa132d8c.tar.xz |
'from os' -> 'import os' and so on...
Diffstat (limited to 'pyload/network/XDCCRequest.py')
-rw-r--r-- | pyload/network/XDCCRequest.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pyload/network/XDCCRequest.py b/pyload/network/XDCCRequest.py index 24146ccaa..b9e9958aa 100644 --- a/pyload/network/XDCCRequest.py +++ b/pyload/network/XDCCRequest.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- # @author: jeix +import os import socket import struct -from os import remove -from os.path import exists from select import select from time import time @@ -57,14 +56,14 @@ class XDCCRequest(object): dccsock.settimeout(self.timeout) dccsock.connect((ip, port)) - if exists(filename): + if os.path.exists(filename): i = 0 nameParts = filename.rpartition(".") while True: newfilename = "%s-%d%s%s" % (nameParts[0], i, nameParts[1], nameParts[2]) i += 1 - if not exists(newfilename): + if not os.path.exists(newfilename): filename = newfilename break @@ -75,7 +74,7 @@ class XDCCRequest(object): if self.abort: dccsock.close() fh.close() - remove(filename) + os.remove(filename) raise Abort self._keepAlive(irc, ircbuffer) @@ -145,5 +144,5 @@ class XDCCRequest(object): return (self.recv * 100) / self.filesize if elf.filesize else 0 - def close(self): + def os.close(self): pass |