Esempio n. 1
0
 def find_pkg_root(self, src_dir):
     if self.manifest_exists(src_dir):
         return src_dir
     for root, _, _ in os.walk(src_dir):
         if self.manifest_exists(root):
             return root
     raise exception.MissingPackageManifest(", ".join(self.manifest_names))
Esempio n. 2
0
    def check_pkg_structure(self, pkg_dir):
        if self.manifest_exists(pkg_dir):
            return pkg_dir

        for root, _, _ in os.walk(pkg_dir):
            if self.manifest_exists(root):
                return root

        raise exception.MissingPackageManifest(self.manifest_name)