# HG changeset patch # User Augie Fackler # Date 2017-10-15 04:06:06 # Node ID 6be264009841be7fc33e71d2f9eda038ae02fa6e # Parent 6f532c1a4af0d99cd2cbac5f3c7028c0ba8cb51e wireproto: use a proper exception instead of `assert False` Differential Revision: https://phab.mercurial-scm.org/D1101 diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -325,7 +325,8 @@ class wirepeer(repository.legacypeer): 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'):