Empty file (GPS.Sport storage backend failure) handling.
[pyrungps.git] / pyrungps / pyrungps_sync.py
index 18c2235c34ac667f1dec830e22980745a9ee2ea6..67362156ea82d66235aeccc78f1dc826017a84fe 100644 (file)
@@ -189,6 +189,10 @@ def sync_db(dbx,username,year,month,dir=".",verbose=False,force=False):
 
         sport = training['sport']
         timestamp = gpx.tracks[0].start_time()
+                
+        if not(timestamp):
+          print("Empty training found, skipping...")
+          continue
         
         print(sport, timestamp)