瀏覽代碼

Getting tired

Foppe Hemminga 6 年之前
父節點
當前提交
375f9a7d70
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      data.py

+ 4 - 4
data.py

@@ -43,14 +43,14 @@ timestamp_latest = res.timestamp
 with open('timestamp.txt', 'r+') as f:
     timestamp_stored = f.read()
     print(timestamp_stored)
-    if timestamp_latest > int(timestamp_stored):
-        # print(timestamp_latest)
-        f.write("{}".format(timestamp_latest))
-    else:
+    if timestamp_latest == int(timestamp_stored):
         # print(timestamp_latest)
         # Exit when there is nothing to do
         sys.exit()
 
+with open('timestamp.txt', 'w') as f:
+    f.write("{}".format(timestamp_latest))
+
 print(timestamp_previous)
 print(timestamp_latest)