Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_fs
Commits
9c67dc59
Commit
9c67dc59
authored
Jul 19, 2024
by
Matthias Weidenthaler
Browse files
Fixed fsspec_header tofile function
parent
f48f7a61
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_fs/fits/fsspec_header.py
View file @
9c67dc59
...
@@ -4,7 +4,7 @@ from ..fsspec_fileobj import open_fileobj
...
@@ -4,7 +4,7 @@ from ..fsspec_fileobj import open_fileobj
from
..s3_config
import
load_s3_options
from
..s3_config
import
load_s3_options
def
tofile
(
fits_header
,
out_path
,
s3_options
=
load_s3_options
(),
*
args
,
**
kwargs
):
def
tofile
(
fits_header
,
out_path
,
s3_options
=
load_s3_options
(),
*
args
,
**
kwargs
):
fileobj
=
open_fileobj
(
out_path
,
s3_options
)
fileobj
=
open_fileobj
(
out_path
,
s3_options
,
mode
=
'wb'
)
fits_header
.
tofile
(
fileobj
,
*
args
,
**
kwargs
)
fits_header
.
tofile
(
fileobj
,
*
args
,
**
kwargs
)
if
hasattr
(
fileobj
,
'close'
):
if
hasattr
(
fileobj
,
'close'
):
fileobj
.
close
()
fileobj
.
close
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment