stringutil: teach pprint how to format None
authorAugie Fackler <augie@google.com>
Fri, 13 Apr 2018 23:55:37 -0400
changeset 37749 73d0a3dd7e53
parent 37748 affcecf20c15
child 37750 f7194c925003
stringutil: teach pprint how to format None Differential Revision: https://phab.mercurial-scm.org/D3358
mercurial/utils/stringutil.py
--- a/mercurial/utils/stringutil.py	Fri Apr 13 23:50:17 2018 -0400
+++ b/mercurial/utils/stringutil.py	Fri Apr 13 23:55:37 2018 -0400
@@ -42,6 +42,8 @@
         return '%d' % o
     elif isinstance(o, float):
         return '%f' % o
+    elif o is None:
+        return b'None'
     else:
         raise error.ProgrammingError('do not know how to format %r' % o)