Changeset 66b54d6


Ignore:
Timestamp:
03/06/2014 07:50:40 PM (11 years ago)
Author:
Calum Lind <calumlind+deluge@gmail.com>
Branches:
2.0.x, develop, master
Children:
dbf4f6
Parents:
30705d6
git-author:
Calum Lind <calumlind+deluge@gmail.com> (03/06/2014 07:46:08 PM)
git-committer:
Calum Lind <calumlind+deluge@gmail.com> (03/06/2014 07:50:40 PM)
Message:

[WebUI] Flake8 web.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • deluge/ui/web/web.py

    r30705d6 r66b54d6  
    4040from optparse import OptionGroup
    4141
     42
    4243class WebUI(UI):
    4344    def __init__(self, args):
     
    4546        deluge_web = server.DelugeWeb()
    4647        deluge_web.start()
     48
    4749
    4850class Web(_UI):
     
    5254    def __init__(self):
    5355        super(Web, self).__init__("web")
    54         self.__server =  None
     56        self.__server = None
    5557
    5658        group = OptionGroup(self.parser, "Web Options")
    5759        group.add_option("-b", "--base", dest="base",
    58             help="Set the base path that the ui is running on (proxying)",
    59             action="store", default=None)
     60                         help="Set the base path that the ui is running on (proxying)",
     61                         action="store", default=None)
    6062        if not (deluge.common.windows_check() or deluge.common.osx_check()):
    61             group.add_option("-d", "--do-not-daemonize", dest="donotdaemonize",
    62             help="Do not daemonize the web interface", action="store_true", default=False)
     63                group.add_option("-d", "--do-not-daemonize", dest="donotdaemonize",
     64                                 help="Do not daemonize the web interface",
     65                                 action="store_true", default=False)
    6366        group.add_option("-P", "--pidfile", dest="pidfile", type="str",
    64             help="Use pidfile to store process id",
    65             action="store", default=None)
     67                         help="Use pidfile to store process id",
     68                         action="store", default=None)
    6669        if not deluge.common.windows_check():
    6770            group.add_option("-U", "--user", dest="user", type="str",
    68                 help="User to switch to. Only use it when starting as root",
    69                 action="store", default=None)
     71                             help="User to switch to. Only use it when starting as root",
     72                             action="store", default=None)
    7073            group.add_option("-g", "--group", dest="group", type="str",
    71                 help="Group to switch to. Only use it when starting as root",
    72                 action="store", default=None)
     74                             help="Group to switch to. Only use it when starting as root",
     75                             action="store", default=None)
    7376        group.add_option("-i", "--interface", dest="interface",
    74             type="str", help="Binds the webserver to a specific IP address",
    75             action="store", default=None)
     77                         type="str", help="Binds the webserver to a specific IP address",
     78                         action="store", default=None)
    7679        group.add_option("-p", "--port", dest="port", type="int",
    77             help="Sets the port to be used for the webserver",
    78             action="store", default=None)
     80                         help="Sets the port to be used for the webserver",
     81                         action="store", default=None)
    7982        group.add_option("--profile", dest="profile",
    80             help="Profile the web server code",
    81             action="store_true", default=False)
     83                         help="Profile the web server code",
     84                         action="store_true", default=False)
    8285        try:
    8386            import OpenSSL
     87            OpenSSL.__version__
    8488        except:
    8589            pass
    8690        else:
    8791            group.add_option("--no-ssl", dest="ssl", action="store_false",
    88                     help="Forces the webserver to disable ssl", default=False)
     92                             help="Forces the webserver to disable ssl", default=False)
    8993            group.add_option("--ssl", dest="ssl", action="store_true",
    90                     help="Forces the webserver to use ssl", default=False)
     94                             help="Forces the webserver to use ssl", default=False)
    9195        self.parser.add_option_group(group)
    9296
     
    168172            run_server()
    169173
     174
    170175def start():
    171176    web = Web()
Note: See TracChangeset for help on using the changeset viewer.