def load(self, type): fname = self.get_temporary() if fname: obj = io.open_from_xml(fname, type) else: obj = io.open_from_xml(self._name, type) obj.locator = self return obj
def load(self, type): fname = self.get_temporary() if fname: from vistrails.db.domain import DBVistrail obj = io.open_from_xml(fname, type) return SaveBundle(DBVistrail.vtType, obj) else: (save_bundle, tmp_dir) = io.open_bundle_from_zip_xml(type, self._name) self.tmp_dir = tmp_dir for obj in save_bundle.get_db_objs(): obj.locator = self return save_bundle