From: Zac Medico Date: Mon, 10 Aug 2009 21:47:30 +0000 (-0000) Subject: Add portage ImportError sys.path insertion. X-Git-Tag: v2.2_rc39~126 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4ae927e113fd9d24036c8038e944ed97df419f2e;p=portage.git Add portage ImportError sys.path insertion. svn path=/main/trunk/; revision=13979 --- diff --git a/bin/egencache b/bin/egencache index ac0786fa5..f5c644be9 100755 --- a/bin/egencache +++ b/bin/egencache @@ -22,7 +22,14 @@ except KeyboardInterrupt: import logging import optparse import os -import portage + +try: + import portage +except ImportError: + from os import path as osp + sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) + import portage + from _emerge.MetadataRegen import MetadataRegen from portage.cache.cache_errors import CacheError, StatCollision from portage.util import writemsg_level