def lookup(impl_or_sel): id = impl_or_sel.id if id.startswith('package:'): return None local_path = impl_or_sel.local_path if local_path is not None: if os.path.isdir(local_path): return local_path raise SafeException("Directory '%s' no longer exists. Try '0compile setup'" % local_path) try: return iface_cache.stores.lookup_any(impl_or_sel.digests) except NotStored, ex: raise NotStored(str(ex) + "\nHint: try '0compile setup'")
def lookup_any(self, digests): path = self.lookup_maybe(digests) if path: return path raise NotStored()