Gentoo Archives: gentoo-commits

From: "Brian Harring (ferringb)" <ferringb@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/pkgcore/files: pkgcore-0.7.7.5-NameError.patch pkgcore-0.7.5-dosym.patch pkgcore-0.7.5-force-python-binary.patch
Date: Tue, 03 Jan 2012 14:02:48
Message-Id: 20120103140238.755EE2004B@flycatcher.gentoo.org
1 ferringb 12/01/03 14:02:38
2
3 Added: pkgcore-0.7.7.5-NameError.patch
4 Removed: pkgcore-0.7.5-dosym.patch
5 pkgcore-0.7.5-force-python-binary.patch
6 Log:
7 Fix NameError in 0.7.7.5 that occurs when pkgcore commands have an uncaught
8 exception. Additionally, remove old versions in the process.
9
10 (Portage version: 2.1.10.44/cvs/Linux x86_64)
11
12 Revision Changes Path
13 1.1 sys-apps/pkgcore/files/pkgcore-0.7.7.5-NameError.patch
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/pkgcore/files/pkgcore-0.7.7.5-NameError.patch?rev=1.1&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/pkgcore/files/pkgcore-0.7.7.5-NameError.patch?rev=1.1&content-type=text/plain
17
18 Index: pkgcore-0.7.7.5-NameError.patch
19 ===================================================================
20 From 4b56e8e31c301840ac8734b601d868a9b4ca42ba Mon Sep 17 00:00:00 2001
21 From: Brian Harring <ferringb@×××××.com>
22 Date: Mon, 2 Jan 2012 13:01:07 -0800
23 Subject: [PATCH] fix NameError's w/in the error pathway
24
25 ---
26 pkgcore/util/commandline.py | 6 ++++--
27 1 files changed, 4 insertions(+), 2 deletions(-)
28
29 diff --git a/pkgcore/util/commandline.py b/pkgcore/util/commandline.py
30 index 02330b4..8a409aa 100644
31 --- a/pkgcore/util/commandline.py
32 +++ b/pkgcore/util/commandline.py
33 @@ -807,12 +807,14 @@ def main(subcommands, args=None, outfile=None, errfile=None,
34 tb = None
35 dump_error(errfile, e, "Error in configuration", tb=tb)
36 except operations.OperationError, e:
37 - exc = sys.exc_info()[-1]
38 + tb = sys.exc_info()[-1]
39 if not getattr(options, 'debug', False):
40 tb = None
41 dump_error(errfile, e, "Error running an operation", tb=tb)
42 except Exception, e:
43 - exc = sys.exc_info()[-1]
44 + tb = sys.exc_info()[-1]
45 + if not getattr(options, 'debug', False):
46 + tb = None
47 dump_error(errfile, e, "Unhandled Exception occured", tb=tb)
48 if out is not None:
49 if exitstatus:
50 --
51 1.7.8.2