summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/Container.py
diff options
context:
space:
mode:
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)