mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Follow DeepSource reccommendations
Nolonger binding to the address, by default it is always localhost
This commit is contained in:
parent
6f759bb678
commit
36a7f83db6
7 changed files with 15 additions and 22 deletions
|
@ -2,7 +2,7 @@
|
|||
Startup arguments for the OnlyLegs gallery
|
||||
|
||||
-p, --port: Port to run on (default: 5000)
|
||||
-a, --address: Address to run on (default: For Debug: localhost, For Production: 0.0.0.0)
|
||||
-a, --address: Address to run on (default: 127.0.0.0)
|
||||
-w, --workers: Number of workers to run (default: 4)
|
||||
|
||||
-d, --debug: Run as Flask app in debug mode (default: False)
|
||||
|
@ -15,7 +15,7 @@ import argparse
|
|||
|
||||
parser = argparse.ArgumentParser(description='Run the OnlyLegs gallery')
|
||||
parser.add_argument('-p', '--port', type=int, default=5000, help='Port to run on')
|
||||
parser.add_argument('-a', '--address', type=str, default=None, help='Address to run on')
|
||||
parser.add_argument('-a', '--address', type=str, default='127.0.0.0', help='Address to run on')
|
||||
parser.add_argument('-w', '--workers', type=int, default=4, help='Number of workers to run')
|
||||
parser.add_argument('-d', '--debug', action='store_true', help='Run as Flask app in debug mode')
|
||||
args = parser.parse_args()
|
||||
|
|
|
@ -9,7 +9,7 @@ class OnlyLegs(Application):
|
|||
"""
|
||||
Gunicorn application
|
||||
"""
|
||||
def __init__(self, options={}): # pylint: disable=W0102, W0231 # noqa
|
||||
def __init__(self, options={}): # pylint: disable=W0102, W0231
|
||||
self.usage = None
|
||||
self.callable = None
|
||||
self.options = options
|
||||
|
@ -25,7 +25,8 @@ class OnlyLegs(Application):
|
|||
cfg[setting.lower()] = value
|
||||
return cfg
|
||||
|
||||
def prog(self): # pylint: disable=C0116, E0202 # noqa
|
||||
@staticmethod
|
||||
def prog(self): # pylint: disable=C0116, E0202
|
||||
return 'OnlyLegs'
|
||||
|
||||
def load(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue