fix
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user