1
0
mirror of https://github.com/djohnlewis/stackdump synced 2024-12-04 23:17:37 +00:00

Fixed a small bug where the 'serving media from' message was printed twice.

This commit is contained in:
Samuel Lai 2012-08-18 21:08:28 +10:00
parent f4940cd1af
commit 46100e7f01

View File

@ -784,7 +784,7 @@ if __name__ == '__main__':
# 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
# 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)
# load the settings file
@ -793,6 +793,7 @@ if __name__ == '__main__':
settings = sys.modules.get('settings')
settings = dict([ (k, getattr(settings, k)) for k in dir(settings) if not k.startswith('__') ])
else:
print('No settings file found; using defaults.')
settings = { }
if settings.get('DEBUG', False):