~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Jelmer Vernooij
  • Date: 2009-04-06 02:54:14 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4255.
  • Revision ID: jelmer@samba.org-20090406025414-65tpjwcmjp5wa5oj
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1051
1051
    """Coerce unicode_or_utf8_string into unicode.
1052
1052
 
1053
1053
    If it is unicode, it is returned.
1054
 
    Otherwise it is decoded from utf-8. If a decoding error
1055
 
    occurs, it is wrapped as a If the decoding fails, the exception is wrapped
1056
 
    as a BzrBadParameter exception.
 
1054
    Otherwise it is decoded from utf-8. If decoding fails, the exception is
 
1055
    wrapped in a BzrBadParameterNotUnicode exception.
1057
1056
    """
1058
1057
    if isinstance(unicode_or_utf8_string, unicode):
1059
1058
        return unicode_or_utf8_string