From af65f64c1ac02172db7e2c659c236124482ad490 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 1 Sep 2011 11:10:31 +0200 Subject: [PATCH] PluginDownloader: Fix overwrite of existing plugin. --- plugins/PluginDownloader/plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/PluginDownloader/plugin.py b/plugins/PluginDownloader/plugin.py index fbfe2c6f2..5b8b690eb 100644 --- a/plugins/PluginDownloader/plugin.py +++ b/plugins/PluginDownloader/plugin.py @@ -30,6 +30,7 @@ import os import json +import shutil import urllib import urllib2 import tarfile @@ -153,7 +154,7 @@ class GithubRepository(GitRepository): newFileName = os.path.join(directory, newFileName) if os.path.exists(newFileName): assert os.path.isdir(newFileName) - shutils.rmtree(newFileName) + shutil.rmtree(newFileName) if extractedFile is None: os.mkdir(newFileName) else: @@ -260,6 +261,7 @@ class PluginDownloader(callbacks.Plugin): repositories[repository].install(plugin) irc.replySuccess() except Exception as e: + raise e #FIXME: more detailed error message log.error(str(e)) irc.error('The plugin could not be installed.')