Explorar o código

Getting tired

Foppe Hemminga %!s(int64=6) %!d(string=hai) anos
pai
achega
b8f56497fe
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      data.py

+ 2 - 2
data.py

@@ -40,9 +40,9 @@ cursor.execute(query)
 res = cursor.fetchone()
 timestamp_latest = res.timestamp
 
-with open('timestamp.txt', 'r+') as f:
+with open('timestamp.txt', 'r') as f:
     timestamp_stored = f.read()
-    print(timestamp_stored)
+    print("timestamp_stored: {}".format(timestamp_stored))
     if timestamp_latest == int(timestamp_stored):
         # print(timestamp_latest)
         # Exit when there is nothing to do