Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 39889:9c8eff5cfa1b
py3: mask out None type when printing in `debuglocks`
Apparently, %b doesn't allow None.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 26 Sep 2018 22:21:25 -0400 |
parents | c31ce080eb75 |
children | c421c22d3ad2 |
comparison
equal
deleted
inserted
replaced
39888:2209e72f9fcb | 39889:9c8eff5cfa1b |
---|---|
1434 user = util.username(st.st_uid) | 1434 user = util.username(st.st_uid) |
1435 locker = vfs.readlock(name) | 1435 locker = vfs.readlock(name) |
1436 if ":" in locker: | 1436 if ":" in locker: |
1437 host, pid = locker.split(':') | 1437 host, pid = locker.split(':') |
1438 if host == socket.gethostname(): | 1438 if host == socket.gethostname(): |
1439 locker = 'user %s, process %s' % (user, pid) | 1439 locker = 'user %s, process %s' % (user or b'None', pid) |
1440 else: | 1440 else: |
1441 locker = 'user %s, process %s, host %s' \ | 1441 locker = 'user %s, process %s, host %s' \ |
1442 % (user, pid, host) | 1442 % (user or b'None', pid, host) |
1443 ui.write(("%-6s %s (%ds)\n") % (name + ":", locker, age)) | 1443 ui.write(("%-6s %s (%ds)\n") % (name + ":", locker, age)) |
1444 return 1 | 1444 return 1 |
1445 except OSError as e: | 1445 except OSError as e: |
1446 if e.errno != errno.ENOENT: | 1446 if e.errno != errno.ENOENT: |
1447 raise | 1447 raise |