Skip to content

Commit

Permalink
Fix broken save() method
Browse files Browse the repository at this point in the history
  • Loading branch information
MoiseRousseau committed Mar 2, 2024
1 parent 3111156 commit 116e294
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion PyGeoStudio/PyGeoStudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ def saveAs(self, f_out, compresslevel=5):
:type compresslevel: int
"""
if isinstance(f_out, io.BytesIO):
zip_out = zipfile.ZipFile(temp_space, 'a')
zip_out = zipfile.ZipFile(f_out, 'a')
prefix = self.f_src.split('/')[-1][:-4]
else:
# create output
if f_out == self.f_src:
Expand Down
2 changes: 1 addition & 1 deletion examples/calibrations/rapid_drawdown_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import numpy as np

src_file = "../GeoStudio_files/Rapid drawdown.gsz"
copy_file = '.'.join(src_file.split('.')[:-1]) + "_tmp.gsz"
copy_file = "Rapid drawdown_tmp.gsz"
geofile_src = pgs.GeoStudioFile(src_file)
geofile_src.saveAs(copy_file)

Expand Down

0 comments on commit 116e294

Please sign in to comment.