Mercurial > hg
diff mercurial/wireproto.py @ 34730:6be264009841
wireproto: use a proper exception instead of `assert False`
Differential Revision: https://phab.mercurial-scm.org/D1101
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 15 Oct 2017 00:06:06 -0400 |
parents | 6f532c1a4af0 |
children | 31fdd0509de9 |
line wrap: on
line diff
--- 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'):