~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/urlutils.py

codecs.getwriter() doesn't set '.encoding' properly, so do the work for it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
436
436
    :return: A unicode string which can be safely encoded into the 
437
437
         specified encoding.
438
438
    """
 
439
    assert encoding is not None, 'you cannot specify None for the display encoding.'
439
440
    if url.startswith('file://'):
440
441
        try:
441
442
            path = local_path_from_url(url)