wireproto: use a proper exception instead of `assert False`
Differential Revision: https://phab.mercurial-scm.org/D1101
--- a/mercurial/wireproto.py Sun Oct 15 00:39:29 2017 -0400
+++ b/mercurial/wireproto.py Sun Oct 15 00:06:06 2017 -0400
@@ -325,7 +325,8 @@
continue
keytype = gboptsmap.get(key)
if keytype is None:
- assert False, 'unexpected'
+ raise error.ProgrammingError(
+ 'Unexpectedly None keytype for key %s' % key)
elif keytype == 'nodes':
value = encodelist(value)
elif keytype in ('csv', 'scsv'):