From 275134399b75d5f6740954c942dbb3921b9828e8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 14 Sep 2011 09:23:18 -0700 Subject: [PATCH] digestgen: handle get_repo_for_location KeyError --- pym/portage/package/ebuild/digestgen.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.26.2