mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
makebs: fix config crash
Without this, running makebuildserver from a clean master results in the following: $ ./makebuildserver Traceback (most recent call last): File "./makebuildserver", line 74, in <module> del(config['__builtins__']) # added by compile/exec KeyError: '__builtins__' This is because a clean checkout has no config, thus exec is never actually ran.
This commit is contained in:
parent
7b36ffa2a6
commit
957f01f1d6
1 changed files with 2 additions and 1 deletions
|
@ -71,7 +71,8 @@ if os.path.exists('makebuildserver.config.py'):
|
||||||
elif os.path.exists('makebs.config.py'):
|
elif os.path.exists('makebs.config.py'):
|
||||||
# this is the old name for the config file
|
# this is the old name for the config file
|
||||||
exec(compile(open('makebs.config.py').read(), 'makebs.config.py', 'exec'), config)
|
exec(compile(open('makebs.config.py').read(), 'makebs.config.py', 'exec'), config)
|
||||||
del(config['__builtins__']) # added by compile/exec
|
if '__builtins__' in config:
|
||||||
|
del(config['__builtins__']) # added by compile/exec
|
||||||
|
|
||||||
if not os.path.exists('makebuildserver') or not os.path.exists(serverdir):
|
if not os.path.exists('makebuildserver') or not os.path.exists(serverdir):
|
||||||
print('This must be run from the correct directory!')
|
print('This must be run from the correct directory!')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue