/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 by Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
50
50
# is quite expensive, even when the message is not printed by any handlers.
51
51
# We should perhaps change back to just simply doing it here.
52
52
 
53
 
 
54
 
import errno
55
53
import os
56
54
import sys
 
55
import re
 
56
 
 
57
from bzrlib.lazy_import import lazy_import
 
58
lazy_import(globals(), """
 
59
import errno
57
60
import logging
 
61
""")
58
62
 
59
63
import bzrlib
60
 
from bzrlib.errors import BzrError, BzrNewError
61
64
from bzrlib.symbol_versioning import (deprecated_function,
62
65
        zero_nine,
63
66
        )
168
171
    """
169
172
    if msg:
170
173
        error(msg)
171
 
    else:
172
 
        exc_str = format_exception_short(sys.exc_info())
173
 
        error(exc_str)
174
174
    log_exception_quietly()
175
175
 
176
176
 
288
288
    """Report an exception that probably indicates a bug in bzr"""
289
289
    import traceback
290
290
    exc_type, exc_object, exc_tb = exc_info
291
 
    print >>err_file, "bzr: ERROR: %s: %s" % (exc_type, exc_object)
 
291
    print >>err_file, "bzr: ERROR: %s.%s: %s" % (
 
292
        exc_type.__module__, exc_type.__name__, exc_object)
292
293
    print >>err_file
293
294
    traceback.print_exception(exc_type, exc_object, exc_tb, file=err_file)
294
295
    print >>err_file