~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Jelmer Vernooij
  • Date: 2010-08-06 00:05:45 UTC
  • mto: This revision was merged to the branch mainline in revision 5370.
  • Revision ID: jelmer@samba.org-20100806000545-kicecc5iu1j2e6zy
Allow passing a tree without a user_url attribute to UncommittedChanges.

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