Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireproto.py @ 21627:3e8bcc90f07c
bundle2: support None parttype in BundleValueError
This will be used for errors at the stream level.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 28 May 2014 16:46:58 -0700 |
parents | 457492741007 |
children | 9bafe09285f2 |
line wrap: on
line diff
--- a/mercurial/wireproto.py Tue May 27 12:16:45 2014 -0700 +++ b/mercurial/wireproto.py Wed May 28 16:46:58 2014 -0700 @@ -806,7 +806,8 @@ except error.BundleValueError, exc: bundler = bundle2.bundle20(repo.ui) errpart = bundler.newpart('B2X:ERROR:UNSUPPORTEDCONTENT') - errpart.addparam('parttype', exc.parttype) + if exc.parttype is not None: + errpart.addparam('parttype', exc.parttype) if exc.params: errpart.addparam('params', '\0'.join(exc.params)) return streamres(bundler.getchunks())