Permalink
Browse files

app.name shall be __main__ for console apps

  • Loading branch information...
1 parent 56afafa commit d2eefe25e7fec31a5f4254f6a65934bd00ab0392 @mitsuhiko mitsuhiko committed Sep 24, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 flask/app.py
View
@@ -466,7 +466,7 @@ def name(self):
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

0 comments on commit d2eefe2

Please sign in to comment.