diff options
author | boyska <piuttosto@logorroici.org> | 2016-12-20 21:25:16 +0300 |
---|---|---|
committer | boyska <piuttosto@logorroici.org> | 2016-12-20 21:26:03 +0300 |
commit | 26ff0914a2003c491bc7c0e18d277b8429ca52b1 (patch) | |
tree | 0b0a2849ef09259706dcd7c459268c35cdb82be4 /plugin_installer | |
parent | 8d601feafe5727388499a7089b2dcf4835ead694 (diff) |
[plugin_installer] change minor parts to https
Diffstat (limited to 'plugin_installer')
-rw-r--r-- | plugin_installer/manifest.ini | 2 | ||||
-rw-r--r-- | plugin_installer/plugin_installer.py | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/plugin_installer/manifest.ini b/plugin_installer/manifest.ini index 156f602..6ed31bc 100644 --- a/plugin_installer/manifest.ini +++ b/plugin_installer/manifest.ini @@ -2,7 +2,7 @@ name: Plugin Installer short_name: plugin_installer version: 0.11.40 -description: Install and upgrade plugins from ftp +description: Install and upgrade plugins from HTTPS authors: Denis Fomin <fominde@gmail.com> Yann Leboulanger <asterix@lagaule.org> homepage: http://trac-plugins.gajim.org/wiki/PluginInstallerPlugin diff --git a/plugin_installer/plugin_installer.py b/plugin_installer/plugin_installer.py index eda312d..dc491ab 100644 --- a/plugin_installer/plugin_installer.py +++ b/plugin_installer/plugin_installer.py @@ -537,9 +537,13 @@ class Ftp(threading.Thread): _('Connecting to server')) if not self.remote_dirs: gobject.idle_add(self.progressbar.set_text, - _('Scan files on the server')) - zip_file = zipfile.ZipFile(self.plugin.retrieve_path(self.plugin.server_folder, - 'manifests_images.zip')) + _('Scan files on the server')) + try: + buf = self.plugin.retrieve_path(self.plugin.server_folder, 'manifests_images.zip') + except: + log.exception("Error fetching plugin list") + return + zip_file = zipfile.ZipFile(buf) manifest_list = zip_file.namelist() progress_step = 1.0 / len(manifest_list) for filename in manifest_list: @@ -610,14 +614,14 @@ class Ftp(threading.Thread): base_dir, user_dir = gajim.PLUGINS_DIRS if not os.path.isdir(user_dir): os.mkdir(user_dir) - local_dir = ld = os.path.join(user_dir, remote_dir) + local_dir = os.path.join(user_dir, remote_dir) if not os.path.isdir(local_dir): os.mkdir(local_dir) local_dir = os.path.split(user_dir)[0] # downloading zip file gobject.idle_add(self.progressbar.set_text, - _('Downloading "%s"') % filename) + _('Downloading "%s"') % filename) try: buf = self.plugin.retrieve_path(self.plugin.server_folder, filename) @@ -628,7 +632,7 @@ class Ftp(threading.Thread): zip_file.extractall(os.path.join(local_dir, 'plugins')) gobject.idle_add(self.window.emit, 'plugin_downloaded', - self.remote_dirs) + self.remote_dirs) gobject.source_remove(self.pulse) |