diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-10-16 15:39:27 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-10-16 15:39:27 +0200 |
commit | 06b0785037a95815be06f5cfcfc64f6120e14956 (patch) | |
tree | f7be722424416dbff7dba6011edcebb4dd64f05a /module/plugins | |
parent | additional fix (diff) | |
download | pyload-06b0785037a95815be06f5cfcfc64f6120e14956.tar.xz |
small improvement
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index dffbc5d5d..d48496c14 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -14,10 +14,9 @@ from copy import copy # http://bugs.python.org/issue1236 # http://bugs.python.org/issue1731717 if sys.version_info < (2, 7) and os.name != "nt": - from subprocess import Popen - import errno + def _eintr_retry_call(func, *args): while True: try: @@ -36,7 +35,7 @@ if sys.version_info < (2, 7) and os.name != "nt": except OSError, e: if e.errno != errno.ECHILD: raise - # This happens if SIGCLD is set to be ignored or waiting + # This happens if SIGCLD is set to be ignored or waiting # for child processes has otherwise been disabled for our # process. This child is dead, we can't get the status. sts = 0 @@ -45,8 +44,6 @@ if sys.version_info < (2, 7) and os.name != "nt": Popen.wait = wait - - if os.name != "nt": from os import chown from pwd import getpwnam @@ -204,7 +201,13 @@ class ExtractArchive(Hook): else: self.logInfo(basename(plugin.file), _("Password protected")) self.logDebug("Passwords: %s" % str(passwords)) - for pw in passwords + self.getPasswords(): + + pwlist = copy(self.getPasswords()) + #remove already supplied pws from list (only local) + for pw in passwords: + if pw in pwlist: pwlist.remove(pw) + + for pw in passwords + pwlist: try: self.logDebug("Try password: %s" % pw) if plugin.checkPassword(pw): |