diff options
Diffstat (limited to 'module/plugins/container/LinkList.py')
-rw-r--r-- | module/plugins/container/LinkList.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/module/plugins/container/LinkList.py b/module/plugins/container/LinkList.py index 7e418bd67..9c76c4341 100644 --- a/module/plugins/container/LinkList.py +++ b/module/plugins/container/LinkList.py @@ -7,27 +7,25 @@ from module.utils import fs_encode class LinkList(Container): - __name__ = "LinkList" - __version__ = "0.12" + __name__ = "LinkList" + __version__ = "0.13" - __pattern__ = r'.+\.txt' + __pattern__ = r'.+\.txt$' __config__ = [("clear", "bool", "Clear Linklist after adding", False), ("encoding", "string", "File encoding (default utf-8)", "")] __description__ = """Read link lists in txt format""" - __author_name__ = ("spoob", "jeix") - __author_mail__ = ("spoob@pyload.org", "jeix@hasnomail.com") + __license__ = "GPLv3" + __authors__ = [("spoob", "spoob@pyload.org"), + ("jeix", "jeix@hasnomail.com")] def decrypt(self, pyfile): try: file_enc = codecs.lookup(self.getConfig("encoding")).name - except: + except Exception: file_enc = "utf-8" - print repr(pyfile.url) - print pyfile.url - file_name = fs_encode(pyfile.url) txt = codecs.open(file_name, 'r', file_enc) @@ -66,8 +64,8 @@ class LinkList(Container): try: txt = open(file_name, 'wb') txt.close() - except: - self.logWarning(_("LinkList could not be cleared.")) + except Exception: + self.logWarning(_("LinkList could not be cleared")) for name, links in packages.iteritems(): self.packages.append((name, links, name)) |