diff --git a/ostap/io/compress_shelve.py b/ostap/io/compress_shelve.py index 30f49152..e8043a01 100755 --- a/ostap/io/compress_shelve.py +++ b/ostap/io/compress_shelve.py @@ -159,7 +159,7 @@ def __init__( if not self.__silent : logger.info ( 'Open DB: %s' % dbname ) - ## filename without extension and the extension itself + ## filename without extension and the extension itself fname , ext = os.path.splitext ( dbname ) self.__extension = ext @@ -200,7 +200,7 @@ def __init__( self.__actual_dbname = filename afiles = tuple ( [ self.dbname + suffix for suffix in ( '' , ',db' , '.dir' , '.pag' , '.dat' ) ] ) - ofiles = set ( [ i for i in glob.iglob ( self.dbname + '*' ) if i in afiles ] ) + ofiles = set ( [ i for i in glob.iglob ( self.dbname + '*' ) if i in afiles ] ) self.__opened = False diff --git a/ostap/io/tests/test_io_dbases.py b/ostap/io/tests/test_io_dbases.py index 9bcff63d..99cf90c6 100644 --- a/ostap/io/tests/test_io_dbases.py +++ b/ostap/io/tests/test_io_dbases.py @@ -41,7 +41,7 @@ def the_name (): item = 'LmdbDict' , CleanUp.tempdir ( prefix = 'ostap-LMDB-' ) , LmdbDict dbases.append ( item ) except ImportError: - logger.warning ( 'LmdbDict is not accessible!' ) + logger.warning ( 'LmdbDict is not accessible!' ) # ============================================================================ try : @@ -50,7 +50,7 @@ def the_name (): item = 'BerkeleyDB' , CleanUp.tempfile ( prefix = 'ostap-BerkeleyDB-' , suffix = '.db' ) , berkeleydb_open dbases.append ( item ) except ImportError: - logger.warning ( 'BerkeleyDB is not accessible!' ) + logger.warning ( 'BerkeleyDB is not accessible!' ) # ============================================================================ try : @@ -59,7 +59,7 @@ def the_name (): item = 'BSDDB3' , CleanUp.tempfile ( prefix = 'ostap-BSDDB3-' , suffix = '.db' ) , bsbdb3_open dbases.append ( item ) except ImportError: - logger.warning ( 'bsddb3 is not accessible!' ) + logger.warning ( 'bsddb3 is not accessible!' ) # ============================================================================ try : @@ -67,7 +67,7 @@ def the_name (): item = 'SqliteDict' , CleanUp.tempfile ( prefix = 'ostap-SqliteDB-' , suffix = '.sql') , SqliteDict dbases.append ( item ) except ImportError: - logger.warning ( 'SQliteDict is not accessible!' ) + logger.warning ( 'SQliteDict is not accessible!' ) # ============================================================================ if ( 3,0 ) <= sys.version_info : @@ -78,7 +78,7 @@ def gnu_open ( filename , flag = 'r' ) : return _gnu_open ( filename , flag ) item = 'dbm.gnu' , CleanUp.tempfile ( prefix = 'ostap-GNUDB-' , suffix = '.db' ) , gnu_open dbases.append ( item ) except ImportError: - logger.warning ( 'dbm.gnuis not accessible!' ) + logger.warning ( 'dbm.gnu is not accessible!' ) # ====================================================================== try : from dbm.ndbm import open as _ndbm_open @@ -86,7 +86,7 @@ def ndbm_open ( filename , flag = 'r' ) : return _ndbm_open ( filename , flag ) item = 'dbm.ndbm' , CleanUp.tempfile ( prefix = 'ostap-NDB-' , suffix = '.db' ) , ndbm_open dbases.append ( item ) except ImportError: - logger.warning ( 'dbm.ndbm is not accessible!' ) + logger.warning ( 'dbm.ndbm is not accessible!' ) # ====================================================================== try : from dbm.dumb import open as dumb_open diff --git a/ostap/io/tests/test_io_shelves.py b/ostap/io/tests/test_io_shelves.py index 8c543508..e322c8b5 100755 --- a/ostap/io/tests/test_io_shelves.py +++ b/ostap/io/tests/test_io_shelves.py @@ -155,14 +155,14 @@ def test_shelves1(): db_zst = zstshelve.open ( db_zst_name , 'r' ) db_root = rootshelve.open ( db_root_name , 'r' ) - logger.info('SQLiteShelve #keys: %s' % len ( list ( db_sql .keys() ) ) ) - logger.info('ZipShelve #keys: %s' % len ( db_zip .keys() ) ) - logger.info('Bz2Shelve #keys: %s' % len ( db_bz2 .keys() ) ) + logger.info('SQLiteShelve #keys: %s' % len ( db_sql ) ) + logger.info('ZipShelve #keys: %s' % len ( db_zip ) ) + logger.info('Bz2Shelve #keys: %s' % len ( db_bz2 ) ) if lzshelve : - logger.info('LzShelve #keys: %s' % len ( db_lz .keys() ) ) + logger.info('LzShelve #keys: %s' % len ( db_lz ) ) if zstshelve : - logger.info('ZstShelve #keys: %s' % len ( db_zst .keys() ) ) - logger.info('RootShelve #keys: %s' % len ( db_root.keys() ) ) + logger.info('ZstShelve #keys: %s' % len ( db_zst ) ) + logger.info('RootShelve #keys: %s' % len ( db_root ) ) with timing ( 'h2-read/SQL' ) : h2_sql = db_sql [ 'histo-2D'] with timing ( 'h2_read/ZIP' ) : h2_zip = db_zip [ 'histo-2D']