[WebUI] Flake8 web.py
This commit is contained in:
parent
30705d6fc9
commit
66b54d6a27
|
@ -39,12 +39,14 @@ import deluge.common
|
|||
from deluge.ui.ui import _UI, UI
|
||||
from optparse import OptionGroup
|
||||
|
||||
|
||||
class WebUI(UI):
|
||||
def __init__(self, args):
|
||||
import server
|
||||
deluge_web = server.DelugeWeb()
|
||||
deluge_web.start()
|
||||
|
||||
|
||||
class Web(_UI):
|
||||
|
||||
help = """Starts the Deluge web interface"""
|
||||
|
@ -59,7 +61,8 @@ class Web(_UI):
|
|||
action="store", default=None)
|
||||
if not (deluge.common.windows_check() or deluge.common.osx_check()):
|
||||
group.add_option("-d", "--do-not-daemonize", dest="donotdaemonize",
|
||||
help="Do not daemonize the web interface", action="store_true", default=False)
|
||||
help="Do not daemonize the web interface",
|
||||
action="store_true", default=False)
|
||||
group.add_option("-P", "--pidfile", dest="pidfile", type="str",
|
||||
help="Use pidfile to store process id",
|
||||
action="store", default=None)
|
||||
|
@ -81,6 +84,7 @@ class Web(_UI):
|
|||
action="store_true", default=False)
|
||||
try:
|
||||
import OpenSSL
|
||||
OpenSSL.__version__
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
|
@ -167,6 +171,7 @@ class Web(_UI):
|
|||
else:
|
||||
run_server()
|
||||
|
||||
|
||||
def start():
|
||||
web = Web()
|
||||
web.start()
|
||||
|
|
Loading…
Reference in New Issue