33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From 4b56e8e31c301840ac8734b601d868a9b4ca42ba Mon Sep 17 00:00:00 2001
|
|
From: Brian Harring <ferringb@gmail.com>
|
|
Date: Mon, 2 Jan 2012 13:01:07 -0800
|
|
Subject: [PATCH] fix NameError's w/in the error pathway
|
|
|
|
---
|
|
pkgcore/util/commandline.py | 6 ++++--
|
|
1 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/pkgcore/util/commandline.py b/pkgcore/util/commandline.py
|
|
index 02330b4..8a409aa 100644
|
|
--- a/pkgcore/util/commandline.py
|
|
+++ b/pkgcore/util/commandline.py
|
|
@@ -807,12 +807,14 @@ def main(subcommands, args=None, outfile=None, errfile=None,
|
|
tb = None
|
|
dump_error(errfile, e, "Error in configuration", tb=tb)
|
|
except operations.OperationError, e:
|
|
- exc = sys.exc_info()[-1]
|
|
+ tb = sys.exc_info()[-1]
|
|
if not getattr(options, 'debug', False):
|
|
tb = None
|
|
dump_error(errfile, e, "Error running an operation", tb=tb)
|
|
except Exception, e:
|
|
- exc = sys.exc_info()[-1]
|
|
+ tb = sys.exc_info()[-1]
|
|
+ if not getattr(options, 'debug', False):
|
|
+ tb = None
|
|
dump_error(errfile, e, "Unhandled Exception occured", tb=tb)
|
|
if out is not None:
|
|
if exitstatus:
|
|
--
|
|
1.7.8.2
|
|
|