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)
def is_valid_db(self, db_id) -> bool: return imgdb.isValidDB(db_id)