1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-04 16:30:12 +02:00

buildserver: consolidate boxfile export code into one block

This is just for clarity, and moving more code into the main() function.
This commit is contained in:
Hans-Christoph Steiner 2016-09-26 05:22:05 -04:00
parent daade7656a
commit 299ed82a88

View File

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