From 6a25942099ec2b3104f2f33ffed69ea59c785aea Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 12 Jun 2016 02:19:52 +0200 Subject: [PATCH] fix "global name 'execfile' not defined" execfile was removed in Python 3.0. This uses 'exec(open(filename).read())' as an alternative, which works on all Python versions. Signed-off-by: Sebastiaan van Stijn --- web/pgAdmin4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pgAdmin4.py b/web/pgAdmin4.py index f45b613..04b070c 100644 --- a/web/pgAdmin4.py +++ b/web/pgAdmin4.py @@ -43,7 +43,7 @@ if config.SERVER_MODE is True: if not os.path.isfile(config.SQLITE_PATH): setupfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'setup.py') - execfile(setupfile) + exec(open(setupfile).read()) ########################################################################## # Server starup -- 2.5.0