def _uid(self, uid): _name = util.get_user(uid) if _name is not None: return "%s (%s)" % (bstring(uid), _name) else: return bstring(uid)
def _make_dummy_dir(self, name): """ Make dummy directory object """ uid = os.getuid() gid = os.getgid() obj = tarfile.TarInfo(name) obj.type = tarfile.DIRTYPE obj.mode = 0755 obj.uid = uid obj.gid = gid obj.mtime = int(time.time()) obj.uname = util.get_user(uid) obj.gname = util.get_group(gid) return obj