fix
This commit is contained in:
@@ -147,15 +147,17 @@ class StravaIntegration(SyncIntegration):
|
|||||||
row.exporttotcx(tcxfilename, notes=newnotes)
|
row.exporttotcx(tcxfilename, notes=newnotes)
|
||||||
if dozip:
|
if dozip:
|
||||||
gzfilename = tcxfilename+'.gz'
|
gzfilename = tcxfilename+'.gz'
|
||||||
with open(tcxfilename, 'rb') as inF:
|
|
||||||
s = inF.read()
|
|
||||||
with gzip.GzipFile(gzfilename, 'wb') as outF:
|
|
||||||
outF.write(s)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.remove(tcxfilename)
|
with open(tcxfilename, 'rb') as inF:
|
||||||
except WindowError: # pragma: no cover
|
s = inF.read()
|
||||||
pass
|
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
|
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