This was raising a TypeError on Python 3 and preventing most (all?)
wireprotov2 commands from working.
Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG69b4a5b89dc5: py3: cast exception to bytes
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
@@ -319,7 +319,8 @@
except Exception as e: action, meta = reactor.onservererror( outstream, command['requestid'],
- _('exception when invoking command: %s') % e)
+ _('exception when invoking command: %s') %
+ pycompat.sysbytes(str(e)))
Nit: stringutil.forcebytestr(e) is better since it can handle platform
strings.