Esempio n. 1
0
    def __init__(self, id):

        for attr_name in self.INFO_ATTRS:
            setattr(self, attr_name, 0)

        # Overload some of them
        self.id = id
        self.last_id = 1
        self.file_name = "not yet saved"  # currently loaded data file

        if not imgdb.isValidDB(id):  # only init if needed
            logger.debug("New dbSpace requires init: %d" % id)
            imgdb.initDbase(id)
Esempio n. 2
0
    def __init__(self, id):

        for attr_name in self.INFO_ATTRS:
            setattr(self, attr_name, 0)

        # Overload some of them
        self.id = id
        self.last_id = 1
        self.file_name = "not yet saved"  # currently loaded data file

        if not imgdb.isValidDB(id):  # only init if needed
            logger.debug("New dbSpace requires init: %d" % id)
            imgdb.initDbase(id)
Esempio n. 3
0
 def is_valid_db(self, db_id) -> bool:
     return imgdb.isValidDB(db_id)
Esempio n. 4
0
 def is_valid_db(self, db_id) -> bool:
     return imgdb.isValidDB(db_id)