mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-11 19:08:40 +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
1 changed files with 7 additions and 2 deletions
|
@ -54,6 +54,11 @@ 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)
|
||||||
|
try:
|
||||||
|
import OpenSSL
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
group.add_option("--ssl", dest="ssl", action="store_true",
|
group.add_option("--ssl", dest="ssl", action="store_true",
|
||||||
help="Forces the webserver to use ssl", default=False)
|
help="Forces the webserver to use ssl", default=False)
|
||||||
self.parser.add_option_group(group)
|
self.parser.add_option_group(group)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue