[New-bugs-announce] [issue15033] Different exit status when using -m
Kamil Kisiel
report at bugs.python.org
Thu Jun 7 23:13:39 CEST 2012
New submission from Kamil Kisiel <kamil at kamilkisiel.net>:
Python returns a different exit status when an exception is raised and -m is used as opposed to just running a module.
A short example, let's call it foo.py:
def main():
raise ValueError()
if __name__ == '__main__':
main()
When run with python foo.py the exit status of the process is 1. If run with python -mfoo the exit status of the process is 255.
----------
messages: 162501
nosy: kisielk
priority: normal
severity: normal
status: open
title: Different exit status when using -m
type: behavior
versions: Python 2.6, Python 2.7, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15033>
_______________________________________
More information about the New-bugs-announce
mailing list