mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-03 10:06:01 +01:00
Fix bug in trexio_flush [Python API]
This commit is contained in:
parent
ab2eee5704
commit
d1ada666c6
@ -853,6 +853,14 @@ class File:
|
||||
|
||||
return self.state
|
||||
|
||||
|
||||
def flush(self):
|
||||
"""Flush the data on disk."""
|
||||
rc = pytr.trexio_flush(self.pytrexio_s)
|
||||
if rc != TREXIO_SUCCESS:
|
||||
raise Error(rc)
|
||||
|
||||
|
||||
def inquire(self):
|
||||
"""Inquire whether a TREXIO file exists."""
|
||||
self.exists = _inquire(self.filename)
|
||||
@ -1506,7 +1514,7 @@ def flush(trexio_file):
|
||||
Parameter is a ~trexio_file~ object that has been created by a call to ~open~ function.
|
||||
"""
|
||||
|
||||
rc = pytr.trexio_flush(trexio_file)
|
||||
rc = pytr.trexio_flush(trexio_file.pytrexio_s)
|
||||
if rc != TREXIO_SUCCESS:
|
||||
raise Error(rc)
|
||||
#+end_src
|
||||
|
Loading…
Reference in New Issue
Block a user