mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-05 11:00:30 +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
|
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):
|
def inquire(self):
|
||||||
"""Inquire whether a TREXIO file exists."""
|
"""Inquire whether a TREXIO file exists."""
|
||||||
self.exists = _inquire(self.filename)
|
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.
|
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:
|
if rc != TREXIO_SUCCESS:
|
||||||
raise Error(rc)
|
raise Error(rc)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
Loading…
Reference in New Issue
Block a user