public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r13979 - main/trunk/bin
@ 2009-08-10 21:47 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-08-10 21:47 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-08-10 21:47:30 +0000 (Mon, 10 Aug 2009)
New Revision: 13979

Modified:
   main/trunk/bin/egencache
Log:
Add portage ImportError sys.path insertion.


Modified: main/trunk/bin/egencache
===================================================================
--- main/trunk/bin/egencache	2009-08-10 21:28:04 UTC (rev 13978)
+++ main/trunk/bin/egencache	2009-08-10 21:47:30 UTC (rev 13979)
@@ -22,7 +22,14 @@
 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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-10 21:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-10 21:47 [gentoo-commits] portage r13979 - main/trunk/bin Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox