diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2015-12-11 11:03:01 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2015-12-11 11:39:16 +0000 |
commit | aaac697a9878c0dd07ee6a875a91b25609e8f2d6 (patch) | |
tree | 27ae95c0625525cd94aa92c3c93bfb37b040740a /deluge/ui/web/server.py | |
parent | ac9e11d732815f75ea0a00d75f998f64b91f5d4d (diff) | |
download | deluge-aaac697a9878c0dd07ee6a875a91b25609e8f2d6.tar.gz deluge-aaac697a9878c0dd07ee6a875a91b25609e8f2d6.tar.bz2 deluge-aaac697a9878c0dd07ee6a875a91b25609e8f2d6.zip |
[WebUI] Remove old code
Diffstat (limited to 'deluge/ui/web/server.py')
-rw-r--r-- | deluge/ui/web/server.py | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index 24e479675..5ac6fb3c3 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -62,12 +62,6 @@ UI_CONFIG_KEYS = ( "show_session_speed", "base", "first_login" ) -OLD_CONFIG_KEYS = ( - "port", "enabled_plugins", "base", "sidebar_show_zero", - "sidebar_show_trackers", "show_keyword_search", "show_sidebar", - "https" -) - def rpath(*paths): """Convert a relative path into an absolute path relative to the location @@ -557,32 +551,6 @@ class DelugeWeb(component.Component): super(DelugeWeb, self).__init__("DelugeWeb") self.config = configmanager.ConfigManager("web.conf", CONFIG_DEFAULTS) - # Check to see if a configuration from the web interface prior to 1.2 - # exists and convert it over. - if os.path.exists(configmanager.get_config_dir("webui06.conf")): - old_config = configmanager.ConfigManager("webui06.conf") - if old_config.config: - # we have an old config file here to handle so we should move - # all the values across to the new config file, and then remove - # it. - for key in OLD_CONFIG_KEYS: - if key in old_config: - self.config[key] = old_config[key] - - # We need to base64 encode the passwords since json can't handle - # them otherwise. - from base64 import encodestring - self.config["old_pwd_md5"] = encodestring(old_config["pwd_md5"]) - self.config["old_pwd_salt"] = encodestring(old_config["pwd_salt"]) - - # Save our config and if it saved successfully then rename the - # old configuration file. - if self.config.save(): - config_dir = os.path.dirname(old_config.config_file) - backup_path = os.path.join(config_dir, 'web.conf.old') - os.rename(old_config.config_file, backup_path) - del old_config - self.socket = None self.top_level = TopLevel() self.site = server.Site(self.top_level) |