示例#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)
示例#2
0
文件: imagedb.py 项目: anti1869/isk
    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)
示例#3
0
 def is_valid_db(self, db_id) -> bool:
     return imgdb.isValidDB(db_id)
示例#4
0
文件: imagedb.py 项目: anti1869/isk
 def is_valid_db(self, db_id) -> bool:
     return imgdb.isValidDB(db_id)