* [gentoo-commits] gentoolkit r477 - in trunk: . src/gentoolkit
@ 2008-02-28 23:43 99% Paul Varner (fuzzyray)
0 siblings, 0 replies; 1+ results
From: Paul Varner (fuzzyray) @ 2008-02-28 23:43 UTC (permalink / raw
To: gentoo-commits
Author: fuzzyray
Date: 2008-02-28 23:43:45 +0000 (Thu, 28 Feb 2008)
New Revision: 477
Modified:
trunk/ChangeLog
trunk/src/gentoolkit/__init__.py
Log:
Fix traceback when accessing the portage db. (Bug #211716)
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-02-28 15:21:24 UTC (rev 476)
+++ trunk/ChangeLog 2008-02-28 23:43:45 UTC (rev 477)
@@ -1,3 +1,7 @@
+2008-02-28: Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix traceback when accessing the portage
+ db. (Bug #211716)
+
2008-02-21: Paul Varner <fuzzyray@gentoo.org>
* revdep-rebuild: "Use /etc/init.d/functions.sh instead of
/sbin/functions.sh. (Bug 210940)
Modified: trunk/src/gentoolkit/__init__.py
===================================================================
--- trunk/src/gentoolkit/__init__.py 2008-02-28 15:21:24 UTC (rev 476)
+++ trunk/src/gentoolkit/__init__.py 2008-02-28 23:43:45 UTC (rev 477)
@@ -27,12 +27,21 @@
import re
from threading import Lock
-settingslock = Lock()
-settings = portage.config(clone=portage.settings)
-porttree = portage.db[portage.root]["porttree"]
-vartree = portage.db[portage.root]["vartree"]
-virtuals = portage.db[portage.root]["virtuals"]
+try:
+ import portage.exception as portage_exception
+except ImportError:
+ import portage_exception
+try:
+ settingslock = Lock()
+ settings = portage.config(clone=portage.settings)
+ porttree = portage.db[portage.root]["porttree"]
+ vartree = portage.db[portage.root]["vartree"]
+ virtuals = portage.db[portage.root]["virtuals"]
+except portage_exception.PermissionDenied, e:
+ sys.stderr.write("Permission denied: '%s'\n" % str(e))
+ sys.exit(e.errno)
+
Config = {
"verbosityLevel": 3
}
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2008-02-28 23:43 99% [gentoo-commits] gentoolkit r477 - in trunk: . src/gentoolkit Paul Varner (fuzzyray)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox