changeset 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 2209e72f9fcb
children 566cc633e637
files mercurial/debugcommands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Wed Sep 26 21:25:18 2018 -0400
+++ b/mercurial/debugcommands.py	Wed Sep 26 22:21:25 2018 -0400
@@ -1436,10 +1436,10 @@
                 if ":" in locker:
                     host, pid = locker.split(':')
                     if host == socket.gethostname():
-                        locker = 'user %s, process %s' % (user, pid)
+                        locker = 'user %s, process %s' % (user or b'None', pid)
                     else:
                         locker = 'user %s, process %s, host %s' \
-                                 % (user, pid, host)
+                                 % (user or b'None', pid, host)
                 ui.write(("%-6s %s (%ds)\n") % (name + ":", locker, age))
                 return 1
             except OSError as e: