comparison mercurial/dispatch.py @ 36682:68328202f270

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.
author Kevin Bullock <kbullock+mercurial@ringworld.org>
date Sat, 03 Mar 2018 19:02:50 -0500
parents 77f98867538f
children 3fdba7fb264d
comparison
equal deleted inserted replaced
36681:340e4b711df7 36682:68328202f270
83 "run the command in sys.argv" 83 "run the command in sys.argv"
84 _initstdio() 84 _initstdio()
85 req = request(pycompat.sysargv[1:]) 85 req = request(pycompat.sysargv[1:])
86 err = None 86 err = None
87 try: 87 try:
88 status = (dispatch(req) or 0) & 255 88 status = (dispatch(req) or 0)
89 except error.StdioError as e: 89 except error.StdioError as e:
90 err = e 90 err = e
91 status = -1 91 status = -1
92 if util.safehasattr(req.ui, 'fout'): 92 if util.safehasattr(req.ui, 'fout'):
93 try: 93 try: