dispatch: don't clamp the range of the exit code twice
authorKevin Bullock <kbullock+mercurial@ringworld.org>
Sat, 03 Mar 2018 19:02:50 -0500
changeset 36682 68328202f270
parent 36681 340e4b711df7
child 36683 e39953fdd924
dispatch: don't clamp the range of the exit code twice We already limit the range to (0, 255) in the call to sys.exit(). The duplicated operation can't possibly be hurting us, but let's clean it up to avoid confusion.
mercurial/dispatch.py
--- a/mercurial/dispatch.py	Sat Mar 03 23:29:40 2018 -0500
+++ b/mercurial/dispatch.py	Sat Mar 03 19:02:50 2018 -0500
@@ -85,7 +85,7 @@
     req = request(pycompat.sysargv[1:])
     err = None
     try:
-        status = (dispatch(req) or 0) & 255
+        status = (dispatch(req) or 0)
     except error.StdioError as e:
         err = e
         status = -1