mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-08 01:24:03 +00:00
add a try/except block testing for openssl support before adding it as an option to the commandline
This commit is contained in:
parent
e9541ab7c6
commit
9762853d32
@ -54,8 +54,13 @@ class Web(_UI):
|
||||
group.add_option("-p", "--port", dest="port", type="int",
|
||||
help="Sets the port to be used for the webserver",
|
||||
action="store", default=None)
|
||||
group.add_option("--ssl", dest="ssl", action="store_true",
|
||||
help="Forces the webserver to use ssl", default=False)
|
||||
try:
|
||||
import OpenSSL
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
group.add_option("--ssl", dest="ssl", action="store_true",
|
||||
help="Forces the webserver to use ssl", default=False)
|
||||
self.parser.add_option_group(group)
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user