From: Hans-Christoph Steiner Date: Mon, 26 Sep 2016 09:22:05 +0000 (-0400) Subject: buildserver: consolidate boxfile export code into one block X-Git-Tag: 0.8~56^2~46 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=299ed82a8851eda49c9aeb2ca95fbe625bd073d5;p=fdroidserver.git buildserver: consolidate boxfile export code into one block This is just for clarity, and moving more code into the main() function. --- diff --git a/makebuildserver b/makebuildserver index 4985b22f..48828925 100755 --- a/makebuildserver +++ b/makebuildserver @@ -20,7 +20,6 @@ if not os.path.exists('makebuildserver') and not os.path.exists('buildserver'): sys.exit(1) -boxfile = os.path.join(os.getcwd(), 'buildserver.box') tail = None parser = OptionParser() @@ -69,9 +68,6 @@ elif os.path.exists('makebs.config.py'): if '__builtins__' in config: del(config['__builtins__']) # added by compile/exec -if os.path.exists(boxfile): - os.remove(boxfile) - # Update cached files. cachedir = config['cachedir'] if not os.path.exists(cachedir): @@ -471,6 +467,9 @@ def main(): v.halt() print("Packaging") + boxfile = os.path.join(os.getcwd(), 'buildserver.box') + if os.path.exists(boxfile): + os.remove(boxfile) v.package(output=boxfile) print("Adding box")