From: Roman Bazalevskiy Date: Sat, 12 Aug 2023 16:40:41 +0000 (+0300) Subject: Empty file (GPS.Sport storage backend failure) handling. X-Git-Url: https://git.rvb.name/pyrungps.git/commitdiff_plain/45d99b67c0d27e8732d45a2b239af1e94d213953?ds=sidebyside;hp=1413506a199e65c44a33aff303f9b3b0139902dd Empty file (GPS.Sport storage backend failure) handling. --- 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)