repomd_file = os.path.join(temp_dir, 'repomd.xml')
file.make_dirs(temp_dir);
- #TODO: support proxy
+ #TODO: support local files(local directory)
+ # local/remote repository
url = os.path.join(baseurl, 'repodata/repomd.xml')
repomd = myurlgrab2(url, repomd_file)
tree = etree.parse(repomd)
root = tree.getroot()
except etree.XMLSyntaxError:
- raise TICError("repomd.xml syntax error.")
+ raise TICError("Unable to parse repomd.xml. Please check the repomd from repository url(%s)", url)
# make cache_dir
- repo_checksum = hashlib.sha256(open(repomd_file, 'rb').read()).hexdigest();
+ repo_checksum = hashlib.sha256(open(repomd_file, 'rb').read()).hexdigest()
cache_dir = os.path.join(cachedir, 'cached', base64url, repo_checksum)
file.make_dirs(cache_dir)