Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Sep 8, 2024
1 parent 96b7873 commit f904975
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ostap/io/compress_shelve.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def __init__(
self.__opened = False
dbase = dbopen ( self.dbname , flag = mode , dbtype = dbtype , **kwargs )
self.__opened = True
if dbase and 'r' != mode and hasattr ( dbase , 'sync' ) : dbase.sync()
if 'r' != mode and hasattr ( dbase , 'sync' ) : dbase.sync()

# =======================================================================
## all files after dbopen
Expand All @@ -269,6 +269,7 @@ def __init__(
# ======================================================================
## actual type of underlying database
self.__dbtype = whichdb ( self.dbname ) ## actual dbtype
if not self.dbtype : logger.error ( 'Type of DB is no determined!' )

# ======================================================================
## expected files for the given DB type
Expand Down
5 changes: 5 additions & 0 deletions ostap/io/tests/test_io_shelves.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ def test_shelves1():
'sqlite' ,
'sqlite3' ,
'dbm.gnu' ,
'dbm.ndbm' ,
'dbm.dumb' ,
'dbhash' ,
'dbm' ,
'gdbm' ,
'dumbdbm' ,
'std' ,
]
Expand Down

0 comments on commit f904975

Please sign in to comment.