diff options
| author | 2014-12-03 00:27:34 +0100 | |
|---|---|---|
| committer | 2014-12-03 00:27:34 +0100 | |
| commit | 588e9dd13c18bcacdc4de8bb9106f1aa279d1e27 (patch) | |
| tree | 115e5f09713a7f3980f8d71395bc5320cc1721bd /module | |
| parent | [ShareonlineBiz] Fix getInfo (2) (diff) | |
| download | pyload-588e9dd13c18bcacdc4de8bb9106f1aa279d1e27.tar.xz | |
[UpdateManager] Fix https://github.com/pyload/pyload/issues/940 (2)
Diffstat (limited to 'module')
| -rw-r--r-- | module/plugins/hooks/UpdateManager.py | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index c69052ece..a47742ab5 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -177,11 +177,11 @@ class UpdateManager(Hook):          schema = updates[1].split('|')          if "BLACKLIST" in updates: -            updates   = updates[2:updates.index('BLACKLIST')]              blacklist = updates[updates.index('BLACKLIST') + 1:] +            updates   = updates[2:updates.index('BLACKLIST')]          else: -            updates   = updates[2:]              blacklist = None +            updates   = updates[2:]          upgradable  = [dict(zip(schema, x.split('|'))) for x in updates]          blacklisted = [(x.split('|')[0], x.split('|')[1].rsplit('.', 1)[0]) for x in blacklist] if blacklist else [] @@ -227,9 +227,9 @@ class UpdateManager(Hook):              newver = float(version)              if not oldver: -                msg = "New plugin [%(type)s] %(name)s (v%(newver).2f)" +                msg = "New plugin: [%(type)s] %(name)s (v%(newver).2f)"              elif newver > oldver: -                msg = "New version of plugin [%(type)s] %(name)s (v%(oldver).2f -> v%(newver).2f)" +                msg = "New version of plugin: [%(type)s] %(name)s (v%(oldver).2f -> v%(newver).2f)"              else:                  continue @@ -239,7 +239,7 @@ class UpdateManager(Hook):                                     'newver': newver})              try:                  content = getURL(url % plugin) -                m = VERSION.search(content) +                m = self.VERSION.search(content)                  if m and m.group(2) == version:                      with open(save_join("userplugins", prefix, filename), "wb") as f: @@ -250,7 +250,7 @@ class UpdateManager(Hook):                      raise Exception, _("Version mismatch")              except Exception, e: -                self.logError(_("Error updating plugin %s") % filename, str(e)) +                self.logError(_("Error updating plugin: %s") % filename, str(e))          if updated:              reloaded = self.core.pluginManager.reloadPlugins(updated)  | 
