From 95e1e8cb67ecb04caa7a0112932ac62542519f01 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 25 Aug 2020 17:12:52 -0700 Subject: [PATCH] [mac] Set __file__ if gramps_launcher.py is run as __main__. Fixes #11874. --- mac/gramps_launcher.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mac/gramps_launcher.py b/mac/gramps_launcher.py index 70c317aa4..d787df5fe 100644 --- a/mac/gramps_launcher.py +++ b/mac/gramps_launcher.py @@ -40,6 +40,8 @@ environ['USERPROFILE'] = environ['HOME'] environ['APPDATA'] = join(environ['HOME'], 'Library', 'Application Support') environ['PATH'] = join(bundle_contents, 'MacOS') + ':' + environ['PATH'] +if __name__ == '__main__': + __file__ = 'gramps_launcher.py' import gramps.grampsapp as app app.main()