diff options
Diffstat (limited to 'module/plugins/internal/Container.py')
-rw-r--r-- | module/plugins/internal/Container.py | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/module/plugins/internal/Container.py b/module/plugins/internal/Container.py index 729592a0d..2300c4cab 100644 --- a/module/plugins/internal/Container.py +++ b/module/plugins/internal/Container.py @@ -4,7 +4,6 @@ from __future__ import with_statement import os import re -import traceback from module.plugins.internal.Crypter import Crypter from module.plugins.internal.Plugin import exists @@ -14,15 +13,15 @@ from module.utils import save_join as fs_join class Container(Crypter): __name__ = "Container" __type__ = "container" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'^unmatchable$' - __config__ = [] #: [("name", "type", "desc", "default")] __description__ = """Base container decrypter plugin""" __license__ = "GPLv3" - __authors__ = [("mkaay", "mkaay@mkaay.de")] + __authors__ = [("mkaay" , "mkaay@mkaay.de" ), + ("Walter Purcaro", "vuolter@gmail.com")] def process(self, pyfile): @@ -44,11 +43,6 @@ class Container(Crypter): self._create_packages() - #: Deprecated method, use `_load2disk` instead (Remove in 0.4.10) - def loadToDisk(self, *args, **kwargs): - return self._load2disk(*args, **kwargs) - - def _load2disk(self): """ Loads container to disk if its stored remotely and overwrite url, @@ -63,20 +57,18 @@ class Container(Crypter): f.write(content) except IOError, e: - self.fail(str(e)) #@TODO: Remove `str` in 0.4.10 + self.fail(e) else: self.pyfile.name = os.path.basename(self.pyfile.url) + if not exists(self.pyfile.url): if exists(fs_join(pypath, self.pyfile.url)): self.pyfile.url = fs_join(pypath, self.pyfile.url) else: self.fail(_("File not exists")) - - - #: Deprecated method, use `delete_tmp` instead (Remove in 0.4.10) - def deleteTmp(self, *args, **kwargs): - return self.delete_tmp(*args, **kwargs) + else: + self.data = self.pyfile.url def delete_tmp(self): @@ -87,5 +79,3 @@ class Container(Crypter): os.remove(self.pyfile.url) except OSError, e: self.log_warning(_("Error removing: %s") % self.pyfile.url, e) - if self.pyload.debug: - traceback.print_exc() |