diff --git a/rowers/integrations/strava.py b/rowers/integrations/strava.py index 2eb3f67d..6f99af05 100644 --- a/rowers/integrations/strava.py +++ b/rowers/integrations/strava.py @@ -147,15 +147,17 @@ class StravaIntegration(SyncIntegration): row.exporttotcx(tcxfilename, notes=newnotes) if dozip: gzfilename = tcxfilename+'.gz' - with open(tcxfilename, 'rb') as inF: - s = inF.read() - with gzip.GzipFile(gzfilename, 'wb') as outF: - outF.write(s) - try: - os.remove(tcxfilename) - except WindowError: # pragma: no cover - pass + with open(tcxfilename, 'rb') as inF: + s = inF.read() + with gzip.GzipFile(gzfilename, 'wb') as outF: + outF.write(s) + try: + os.remove(tcxfilename) + except WindowError: # pragma: no cover + pass + except FileNotFoundError: + return '' return gzfilename diff --git a/rowers/tests/testdata/testdata.tcx.gz b/rowers/tests/testdata/testdata.tcx.gz index 187f0fe0..ce46f3dd 100644 Binary files a/rowers/tests/testdata/testdata.tcx.gz and b/rowers/tests/testdata/testdata.tcx.gz differ