From: Zac Medico Date: Wed, 14 Sep 2011 16:23:18 +0000 (-0700) Subject: digestgen: handle get_repo_for_location KeyError X-Git-Tag: v2.2.0_alpha57~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=275134399b75d5f6740954c942dbb3921b9828e8;p=portage.git digestgen: handle get_repo_for_location KeyError --- diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py index 7b5897202..325fc52b1 100644 --- a/pym/portage/package/ebuild/digestgen.py +++ b/pym/portage/package/ebuild/digestgen.py @@ -52,7 +52,13 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None): del e return 0 mytree = os.path.dirname(os.path.dirname(mysettings["O"])) - mf = mysettings.repositories.get_repo_for_location(mytree) + try: + mf = mysettings.repositories.get_repo_for_location(mytree) + except KeyError: + # backward compatibility + mytree = os.path.realpath(mytree) + mf = mysettings.repositories.get_repo_for_location(mytree) + mf = mf.load_manifest(mysettings["O"], mysettings["DISTDIR"], fetchlist_dict=fetchlist_dict) # Don't require all hashes since that can trigger excessive