From: Christian Heller Date: Wed, 1 Jul 2020 19:49:43 +0000 (+0200) Subject: Minor code re-arrangement. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/day?a=commitdiff_plain;h=ea8a53f23b20bebeeabb6716a5587731f60b28d5;p=berlin-corona-table Minor code re-arrangement. --- diff --git a/enhance_table.py b/enhance_table.py index 2a89c4b..774b333 100755 --- a/enhance_table.py +++ b/enhance_table.py @@ -1,11 +1,5 @@ #!//usr/bin/env python3 -import sys -if len(sys.argv) != 2: - print('Expecting infections table file path as only argument.') - exit(1) -infections_table = sys.argv[1] - # District population numbers as per Wikipedia. district_pops = { 'CW': 342332, @@ -23,6 +17,12 @@ district_pops = { 'sum': 3754418, } +# Read infections table file lines. +import sys +if len(sys.argv) != 2: + print('Expecting infections table file path as only argument.') + exit(1) +infections_table = sys.argv[1] f = open(infections_table, 'r') lines = f.readlines() f.close()