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.
This commit is contained in:
Sebastiaan van Stijn
2016-06-13 16:24:54 +01:00
committed by Dave Page
parent 1f9d0ffc54
commit 8b770ae479

View File

@@ -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