mirror of
https://github.com/djohnlewis/stackdump
synced 2025-04-07 10:13:27 +00:00
Fixed a small bug where the 'serving media from' message was printed twice.
This commit is contained in:
parent
f4940cd1af
commit
46100e7f01
@ -784,7 +784,7 @@ if __name__ == '__main__':
|
|||||||
# only do these things in the child processes, not the parents. Applies when
|
# only do these things in the child processes, not the parents. Applies when
|
||||||
# the auto-reload option is on (reloader=True). When it is on, the
|
# the auto-reload option is on (reloader=True). When it is on, the
|
||||||
# BOTTLE_CHILD env var is True if this is the child process.
|
# BOTTLE_CHILD env var is True if this is the child process.
|
||||||
if os.environ.get('BOTTLE_CHILD', True):
|
if os.environ.get('BOTTLE_CHILD', 'false') == 'true':
|
||||||
print('Serving media from: %s' % MEDIA_ROOT)
|
print('Serving media from: %s' % MEDIA_ROOT)
|
||||||
|
|
||||||
# load the settings file
|
# load the settings file
|
||||||
@ -793,6 +793,7 @@ if __name__ == '__main__':
|
|||||||
settings = sys.modules.get('settings')
|
settings = sys.modules.get('settings')
|
||||||
settings = dict([ (k, getattr(settings, k)) for k in dir(settings) if not k.startswith('__') ])
|
settings = dict([ (k, getattr(settings, k)) for k in dir(settings) if not k.startswith('__') ])
|
||||||
else:
|
else:
|
||||||
|
print('No settings file found; using defaults.')
|
||||||
settings = { }
|
settings = { }
|
||||||
|
|
||||||
if settings.get('DEBUG', False):
|
if settings.get('DEBUG', False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user