~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-08-06 12:43:32 UTC
  • mfrom: (5368.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20100806124332-dywuju3s7bzn5y69
Cope with trees without user_url property in UncomittedChanges
        exception. (Jelmer)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2843
2843
        else:
2844
2844
            more = ' ' + more
2845
2845
        import bzrlib.urlutils as urlutils
2846
 
        display_url = urlutils.unescape_for_display(
2847
 
            tree.user_url, 'ascii')
 
2846
        user_url = getattr(tree, "user_url", None)
 
2847
        if user_url is None:
 
2848
            display_url = str(tree)
 
2849
        else:
 
2850
            display_url = urlutils.unescape_for_display(user_url, 'ascii')
2848
2851
        BzrError.__init__(self, tree=tree, display_url=display_url, more=more)
2849
2852
 
2850
2853