diff options
author | 2014-12-30 20:21:23 +0100 | |
---|---|---|
committer | 2014-12-30 20:21:23 +0100 | |
commit | ac9ba34bd5e629ddfbe67dec88ff2e0653e80356 (patch) | |
tree | f77bc281bd083145b19e82bf0e5ff34f5cd6f01a /module/plugins/Container.py | |
parent | [Oboom] new hoster and account (diff) | |
parent | Update some MultiHoster __pattern__ (diff) | |
download | pyload-ac9ba34bd5e629ddfbe67dec88ff2e0653e80356.tar.xz |
Merge pull request #1 from pyload/stable
Merge
Diffstat (limited to 'module/plugins/Container.py')
-rw-r--r-- | module/plugins/Container.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/module/plugins/Container.py b/module/plugins/Container.py index 685ceac20..c233d3710 100644 --- a/module/plugins/Container.py +++ b/module/plugins/Container.py @@ -13,7 +13,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. - + @author: mkaay """ @@ -28,9 +28,9 @@ class Container(Crypter): __version__ = "0.1" __pattern__ = None __type__ = "container" - __description__ = """Base container decrypter plugin""" - __author_name__ = "mkaay" - __author_mail__ = "mkaay@mkaay.de" + __description__ = """Base container plugin""" + __author_name__ = ("mkaay") + __author_mail__ = ("mkaay@mkaay.de") def preprocessing(self, thread): @@ -38,19 +38,19 @@ class Container(Crypter): self.setup() self.thread = thread - + self.loadToDisk() self.decrypt(self.pyfile) self.deleteTmp() - + self.createPackages() - + def loadToDisk(self): """loads container to disk if its stored remotely and overwrite url, or check existent on several places at disk""" - + if self.pyfile.url.startswith("http"): self.pyfile.name = re.findall("([^\/=]+)", self.pyfile.url)[-1] content = self.load(self.pyfile.url) @@ -58,7 +58,7 @@ class Container(Crypter): f = open(self.pyfile.url, "wb" ) f.write(content) f.close() - + else: self.pyfile.name = basename(self.pyfile.url) if not exists(self.pyfile.url): @@ -66,8 +66,10 @@ class Container(Crypter): self.pyfile.url = join(pypath, self.pyfile.url) else: self.fail(_("File not exists.")) - + def deleteTmp(self): if self.pyfile.name.startswith("tmp_"): remove(self.pyfile.url) + + |