changeset 37472:2f81926c7f89

wireproto: fix repr(frame) to not crash by unknown type id Follows up 5ef2da00e935.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 08 Apr 2018 11:14:47 +0900
parents 51d5e1ff0613
children 7c2c7c749411
files mercurial/wireprotoframing.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireprotoframing.py	Sun Apr 08 15:39:08 2018 +0900
+++ b/mercurial/wireprotoframing.py	Sun Apr 08 11:14:47 2018 +0900
@@ -150,7 +150,7 @@
                 'type=%s; flags=%s)' % (
             len(self.payload), self.requestid, self.streamid,
             humanflags(STREAM_FLAGS, self.streamflags), typename,
-            humanflags(FRAME_TYPE_FLAGS[self.typeid], self.flags)))
+            humanflags(FRAME_TYPE_FLAGS.get(self.typeid, {}), self.flags)))
 
 def makeframe(requestid, streamid, streamflags, typeid, flags, payload):
     """Assemble a frame into a byte array."""