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