~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 07:56:03 UTC
  • mfrom: (3224.5.40 faster-startup)
  • Revision ID: pqm@pqm.ubuntu.com-20081001075603-s9nynw8y85fmrprj
Reduce startup time by a small amount. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1401
1401
    def _run_bzr_core(self, args, retcode, encoding, stdin,
1402
1402
            working_dir):
1403
1403
        if encoding is None:
1404
 
            encoding = bzrlib.user_encoding
 
1404
            encoding = osutils.get_user_encoding()
1405
1405
        stdout = StringIOWrapper()
1406
1406
        stderr = StringIOWrapper()
1407
1407
        stdout.encoding = encoding
3240
3240
    possible_vals = [u'm\xb5', u'\xe1', u'\u0410']
3241
3241
    for uni_val in possible_vals:
3242
3242
        try:
3243
 
            str_val = uni_val.encode(bzrlib.user_encoding)
 
3243
            str_val = uni_val.encode(osutils.get_user_encoding())
3244
3244
        except UnicodeEncodeError:
3245
3245
            # Try a different character
3246
3246
            pass