New submission from Kamil Kisiel :
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__':
m
Kamil Kisiel added the comment:
Here's my proposed patch for the documentation, against the head of the 2.7
branch.
--
keywords: +patch
Added file: http://bugs.python.org/file22570/os.rst.patch
___
Python tracker
<http://bugs.python.org/is
Kamil Kisiel added the comment:
The application is interfacing with a C library that uses abort() to signal
fatal errors (horrible, I know..). Instead of core dumping I would like to be
able to handle these errors at the Python level and do something else. It's
starting to sound like
New submission from Kamil Kisiel :
It seems that registering a signal handler for SIGABRT doesn't handle the
signal from os.abort().
Example code:
import signal, os
import time
def handler(signum, frame):
print "Signal!"
raise Exception()
signal.signal(signal.S
Changes by Kamil Kisiel :
--
nosy: kisielk
priority: normal
severity: normal
status: open
title: signal handler dpes
___
Python tracker
<http://bugs.python.org/issue12
Kamil Kisiel added the comment:
I mostly wanted to just report the issue rather than propose a solution, so I'm
in favor of whatever everyone feels is best.
As for how I came across the issue, it was mostly curiosity, I wanted to see
the numerical value of all the os.EX_* constants an
Kamil Kisiel added the comment:
That should have read "Linux and OS X installs of *Python*".
--
___
Python tracker
<http://bugs.python.org/issue9933>
___
__
New submission from Kamil Kisiel :
The library documentation (http://docs.python.org/library/os.html) states:
"""
os.EX_NOTFOUND
Exit code that means something like “an entry was not found”.
Availability: Unix.
New in version 2.3.
"""
However, on both my Linux
Kamil Kisiel added the comment:
While I agree this functionality isn't strictly necessary I think it makes
sense from a semantic point of view. I ran in to this issue today while writing
some code and I simply expected the negative syntax to work, given that the
format string s