Skip to content
Myr

app.name shall be __main__ for console apps

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 56afafa · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:flask/app.py+1 added-1 removed
464 unmodified lines
465 """466 if self.import_name == '__main__':467 fn = getattr(sys.modules['__main__'], '__file__', None)468 if fn is None:469 return 'unknown'469 return '__main__'470 return os.path.splitext(os.path.basename(fn))[0]471 return self.import_name472473 @property
1080 unmodified lines