Fix #870 use proper config location for loading ssl cert

This commit is contained in:
Andrew Resch 2009-03-31 18:42:10 +00:00
parent 1da46653e6
commit 8d8e1ef5c3
2 changed files with 6 additions and 3 deletions

View file

@ -4,6 +4,9 @@
* Fix #855 force a resume on a torrent if a 'Force Recheck' is initiated
* Fix #862 deluged crash when access http://localhost:58846
==== WebUI ====
* Fix #870 use proper config location for loading ssl cert
=== Deluge 1.1.5 - (16 March 2009) ===
==== Core ====
* Fix config file saving when no current config file exists

View file

@ -25,6 +25,7 @@ import gettext
import locale
import deluge.common
from deluge.configmanager import ConfigManager
import deluge.configmanager
import pkg_resources
from deluge.ui.client import sclient
import components
@ -113,9 +114,8 @@ def create_webserver(debug = False, base_url =None):
https = False
if config["https"]:
import os
from deluge.common import get_default_config_dir
cert_path = os.path.join(get_default_config_dir("ssl") ,"deluge.cert.pem" )
key_path = os.path.join(get_default_config_dir("ssl") ,"deluge.key.pem" )
cert_path = deluge.configmanager.get_config_dir("ssl/deluge.cert.pem")
key_path = deluge.configmanager.get_config_dir("ssl/deluge.key.pem")
if os.path.exists (key_path) and os.path.exists (cert_path):
server.ssl_certificate = cert_path
server.ssl_private_key = key_path