/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Robert Collins
  • Date: 2010-05-06 11:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506110810-h3j07fh5gmw54s25
Cleaner matcher matching revised unlocking protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
lazy_import(globals(), """
27
27
from datetime import datetime
28
28
import errno
29
 
import getpass
30
29
from ntpath import (abspath as _nt_abspath,
31
30
                    join as _nt_join,
32
31
                    normpath as _nt_normpath,
2303
2302
        return os.fdopen(os.open(filename, flags), mode, bufsize)
2304
2303
else:
2305
2304
    open_file = open
2306
 
 
2307
 
 
2308
 
def getuser_unicode():
2309
 
    """Return the username as unicode.
2310
 
    """
2311
 
    try:
2312
 
        user_encoding = get_user_encoding()
2313
 
        username = getpass.getuser().decode(user_encoding)
2314
 
    except UnicodeDecodeError:
2315
 
        raise errors.BzrError("Can't decode username as %s." % \
2316
 
                user_encoding)
2317
 
    return username