btlog: fix bug with first run, the etag variable needs to exist

This commit is contained in:
Hans-Christoph Steiner 2017-04-06 23:36:31 +02:00
parent 4e4c6d9acf
commit 5020f70997

View file

@ -199,6 +199,7 @@ def main():
headers = { headers = {
'User-Agent': 'F-Droid 0.102.3' 'User-Agent': 'F-Droid 0.102.3'
} }
etag = None
if os.path.exists(http_headers_file): if os.path.exists(http_headers_file):
with open(http_headers_file) as fp: with open(http_headers_file) as fp:
etag = json.load(fp)['ETag'] etag = json.load(fp)['ETag']