From: Daniel Martí Date: Wed, 27 Jul 2016 09:20:17 +0000 (+0200) Subject: makebs: fix config crash X-Git-Tag: 0.7.0~22 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=957f01f1d664f8d55f6330464a8ef8bcf63dbdc4;p=fdroidserver.git 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 del(config['__builtins__']) # added by compile/exec KeyError: '__builtins__' This is because a clean checkout has no config, thus exec is never actually ran. --- diff --git a/makebuildserver b/makebuildserver index 2397fb4b..08be3829 100755 --- a/makebuildserver +++ b/makebuildserver @@ -71,7 +71,8 @@ if os.path.exists('makebuildserver.config.py'): elif os.path.exists('makebs.config.py'): # this is the old name for the config file 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): print('This must be run from the correct directory!')