~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Robert Collins
  • Date: 2010-01-08 06:33:05 UTC
  • mto: This revision was merged to the branch mainline in revision 4944.
  • Revision ID: robertc@robertcollins.net-20100108063305-qxgq2t7prgp0op1j
Adjust errors.py to fix missing references to 'warn'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1247
1247
class AmbiguousBase(BzrError):
1248
1248
 
1249
1249
    def __init__(self, bases):
1250
 
        warn("BzrError AmbiguousBase has been deprecated as of bzrlib 0.8.",
1251
 
                DeprecationWarning)
 
1250
        symbol_versioning.warn("BzrError AmbiguousBase has been deprecated "
 
1251
            "as of bzrlib 0.8.", DeprecationWarning, stacklevel=2)
1252
1252
        msg = ("The correct base is unclear, because %s are all equally close"
1253
1253
                % ", ".join(bases))
1254
1254
        BzrError.__init__(self, msg)
2950
2950
    _fmt = ("Hook '%(hook_name)s' during %(hook_stage)s failed:\n"
2951
2951
            "%(traceback_text)s%(exc_value)s")
2952
2952
 
2953
 
    def __init__(self, hook_stage, hook_name, exc_info):
2954
 
        warn("BzrError HookFailed has been deprecated as of bzrlib 2.1.",
2955
 
                DeprecationWarning)
 
2953
    def __init__(self, hook_stage, hook_name, exc_info, warn=True):
 
2954
        if warn:
 
2955
            symbol_versioning.warn("BzrError HookFailed has been deprecated "
 
2956
                "as of bzrlib 2.1.", DeprecationWarning, stacklevel=2)
2956
2957
        import traceback
2957
2958
        self.hook_stage = hook_stage
2958
2959
        self.hook_name = hook_name