From d2eefe25e7fec31a5f4254f6a65934bd00ab0392 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sat, 24 Sep 2011 20:25:28 +0200 Subject: [PATCH] app.name shall be __main__ for console apps --- flask/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/app.py b/flask/app.py index 1ad669e3..adc017d0 100644 --- a/flask/app.py +++ b/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