From 61a95d8b526d48371056047cdcff6c7f5bd18dc9 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 2 Oct 2015 11:30:14 +0200 Subject: [PATCH] handle express issues by filename --- process/compress.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/process/compress.py b/process/compress.py index 95b725fb0..204d580d7 100755 --- a/process/compress.py +++ b/process/compress.py @@ -24,7 +24,13 @@ try: except: print "%s: reports.txt file does not exist" % (argv[0], ) exit(0) - + +extras = [ '../wochenbericht.txt' ] +express='../express-%s.txt' % turn +if os.path.isfile(express): + os.symlink(express, 'express.txt') + extras.append('express.txt') + for line in infile.readlines(): settings = line[:-1].split(":") options = { "turn" : turn} @@ -38,7 +44,6 @@ for line in infile.readlines(): if not options.has_key("reports"): continue reports = options["reports"].split(",") -# reports = reports + [ "iso.cr" ] prefix = "%(turn)s-%(faction)s." % options if options["compression"]=="zip": output = prefix+"zip" @@ -61,7 +66,6 @@ for line in infile.readlines(): if os.path.isfile(output): continue os.system("bzip2 %s" % filename) - extras = [ '../wochenbericht.txt', '../express.txt' ] for extra in extras: if os.path.isfile(extra): files = files + [extra]