Tobias Simetsreiter 5 роки тому
батько
коміт
c2646ab264
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      ttsselfhoster.py

+ 1 - 1
ttsselfhoster.py

@@ -82,7 +82,7 @@ def cache_file(url, cache_dir, force=False):
     if force or (not os.path.isfile(sha_file)):
         sha_f = get_file(url, cache_dir, sha_file)
         if sha_f:
-            with open(url_file, "w+") as fd:
+            with open(url_file, "a+") as fd:
                 for line in fd.readlines():
                     if json.loads(line)["sha_f"] == sha_f:
                         return sha_f