mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-12 19:36:39 +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",
|
group.add_option("-p", "--port", dest="port", type="int",
|
||||||
help="Sets the port to be used for the webserver",
|
help="Sets the port to be used for the webserver",
|
||||||
action="store", default=None)
|
action="store", default=None)
|
||||||
group.add_option("--ssl", dest="ssl", action="store_true",
|
try:
|
||||||
help="Forces the webserver to use ssl", default=False)
|
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)
|
self.parser.add_option_group(group)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user