def db_change_module(self, module):
        self.is_dirty = True
        try:
            i = self.db_modules_inverted_id_index[module._db_id]
        except __HOLE__:
            found = False
            for i in xrange(len(self._db_modules)):
                if self._db_modules[i]._db_id == module._db_id:
                    found = True
                    break
            if not found:
                self.db_add_module(module)
                return
        self._db_modules[i] = module
        self.db_modules_id_index[module._db_id] = module
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_9_1/domain/auto_gen.py/DBWorkflow.db_change_module