Fix references to _ucache and _gcache

This commit is contained in:
Matt Mackall 2009-07-06 15:20:05 -05:00
commit dbe27ffe29

10
smem
View file

@ -46,12 +46,12 @@ class procdata(object):
return self._stat('%d/cmdline' % pid).st_gid return self._stat('%d/cmdline' % pid).st_gid
def username(self, uid): def username(self, uid):
if uid not in _ucache: if uid not in _ucache:
_ucache[uid] = pwd.getpwuid(uid)[0] self._ucache[uid] = pwd.getpwuid(uid)[0]
return _ucache[uid] return self._ucache[uid]
def groupname(self, gid): def groupname(self, gid):
if gid not in _gcache: if gid not in self._gcache:
_gcache[gid] = pwd.getgrgid(gid)[0] self._gcache[gid] = pwd.getgrgid(gid)[0]
return _gcache[gid] return self._gcache[gid]
class tardata(procdata): class tardata(procdata):
def __init__(self, source): def __init__(self, source):