summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/Container.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 02:00:28 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 03:22:29 +0200
commit0349b81a10d2937897f30031c4dedb49aa132d8c (patch)
tree3db2827cd64888cc013e064d4e201b8a6ddbc7a9 /pyload/plugin/Container.py
parentMerge pull request #12 from GammaC0de/GammaC0de-fix-api (diff)
downloadpyload-0349b81a10d2937897f30031c4dedb49aa132d8c.tar.xz
'from os' -> 'import os' and so on...
Diffstat (limited to 'pyload/plugin/Container.py')
-rw-r--r--pyload/plugin/Container.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/pyload/plugin/Container.py b/pyload/plugin/Container.py
index 24fbf3738..5d7a99eac 100644
--- a/pyload/plugin/Container.py
+++ b/pyload/plugin/Container.py
@@ -2,11 +2,9 @@
from __future__ import with_statement
+import os
import re
-from os import remove
-from os.path import basename, exists
-
from pyload.plugin.Crypter import Crypter
from pyload.utils import fs_join
@@ -53,9 +51,9 @@ class Container(Crypter):
self.fail(str(e))
else:
- self.pyfile.name = basename(self.pyfile.url)
- if not exists(self.pyfile.url):
- if exists(fs_join(pypath, self.pyfile.url)):
+ self.pyfile.name = os.path.basename(self.pyfile.url)
+ if not os.path.exists(self.pyfile.url):
+ if os.path.exists(fs_join(pypath, self.pyfile.url)):
self.pyfile.url = fs_join(pypath, self.pyfile.url)
else:
self.fail(_("File not exists"))
@@ -63,4 +61,4 @@ class Container(Crypter):
def deleteTmp(self):
if self.pyfile.name.startswith("tmp_"):
- remove(self.pyfile.url)
+ os.remove(self.pyfile.url)