From 45d99b67c0d27e8732d45a2b239af1e94d213953 Mon Sep 17 00:00:00 2001 From: Roman Bazalevskiy Date: Sat, 12 Aug 2023 19:40:41 +0300 Subject: [PATCH] Empty file (GPS.Sport storage backend failure) handling. --- pyrungps/pyrungps_sync.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyrungps/pyrungps_sync.py b/pyrungps/pyrungps_sync.py index 18c2235..6736215 100644 --- a/pyrungps/pyrungps_sync.py +++ b/pyrungps/pyrungps_sync.py @@ -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) -- 2.34.1