Browse Source

app.name shall be __main__ for console apps

pull/330/head
Armin Ronacher 14 years ago
parent
commit
d2eefe25e7
  1. 2
      flask/app.py

2
flask/app.py

@ -466,7 +466,7 @@ class Flask(_PackageBoundObject):
if self.import_name == '__main__':
fn = getattr(sys.modules['__main__'], '__file__', None)
if fn is None:
return 'unknown'
return '__main__'
return os.path.splitext(os.path.basename(fn))[0]
return self.import_name

Loading…
Cancel
Save