~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-27 00:22:26 UTC
  • mfrom: (5904.1.2 cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20110527002226-47nfzevxy52b4pn1
(vila) Fix some imports and other pyflakes failures. (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
    mail_client,
85
85
    mergetools,
86
86
    osutils,
87
 
    registry,
88
87
    symbol_versioning,
89
88
    trace,
90
89
    transport,
94
93
    )
95
94
from bzrlib.util.configobj import configobj
96
95
""")
 
96
from bzrlib import (
 
97
    registry,
 
98
    )
97
99
 
98
100
 
99
101
CHECK_IF_POSSIBLE=0
1477
1479
    try:
1478
1480
        w = pwd.getpwuid(uid)
1479
1481
    except KeyError:
1480
 
        mutter('no passwd entry for uid %d?' % uid)
 
1482
        trace.mutter('no passwd entry for uid %d?' % uid)
1481
1483
        return None, None
1482
1484
 
1483
1485
    # we try utf-8 first, because on many variants (like Linux),
1492
1494
            encoding = osutils.get_user_encoding()
1493
1495
            gecos = w.pw_gecos.decode(encoding)
1494
1496
        except UnicodeError, e:
1495
 
            mutter("cannot decode passwd entry %s" % w)
 
1497
            trace.mutter("cannot decode passwd entry %s" % w)
1496
1498
            return None, None
1497
1499
    try:
1498
1500
        username = w.pw_name.decode(encoding)
1499
1501
    except UnicodeError, e:
1500
 
        mutter("cannot decode passwd entry %s" % w)
 
1502
        trace.mutter("cannot decode passwd entry %s" % w)
1501
1503
        return None, None
1502
1504
 
1503
1505
    comma = gecos.find(',')