Rev 4827: (robertc) Fix handling of -Derror for ValueError. (Benoit PIERRE) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Nov 26 00:25:37 GMT 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4827 [merge]
revision-id: pqm at pqm.ubuntu.com-20091126002527-dhl5lm8gsod3kevf
parent: pqm at pqm.ubuntu.com-20091125103441-g8yhh49b6b6ksllc
parent: benoit.pierre at gmail.com-20091119204751-ymw5ka7njvkiasm2
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-11-26 00:25:27 +0000
message:
  (robertc) Fix handling of -Derror for ValueError. (Benoit PIERRE)
modified:
  bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py	2009-09-23 06:01:45 +0000
+++ b/bzrlib/trace.py	2009-11-19 20:47:51 +0000
@@ -445,9 +445,12 @@
 
     :return: The appropriate exit code for this error.
     """
-    exc_type, exc_object, exc_tb = exc_info
     # Log the full traceback to ~/.bzr.log
     log_exception_quietly()
+    if 'error' in debug.debug_flags:
+        print_exception(exc_info, err_file)
+        return errors.EXIT_ERROR
+    exc_type, exc_object, exc_tb = exc_info
     if (isinstance(exc_object, IOError)
         and getattr(exc_object, 'errno', None) == errno.EPIPE):
         err_file.write("bzr: broken pipe\n")
@@ -494,9 +497,6 @@
     :param advice: Extra advice to the user to be printed following the
         exception.
     """
-    if 'error' in debug.debug_flags:
-        print_exception(exc_info, err_file)
-        return
     err_file.write("bzr: ERROR: %s\n" % (exc_info[1],))
     if advice:
         err_file.write("%s\n" % (advice,))




More information about the bazaar-commits mailing list