[Patches] [ python-Patches-1376309 ] subprocess.CalledProcessError uses errno incorrectly

SourceForge.net noreply at sourceforge.net
Thu Dec 8 15:27:11 CET 2005


Patches item #1376309, was opened at 2005-12-08 14:14
Message generated for change (Comment added) made by hoffmanm
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1376309&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Hoffman (hoffmanm)
Assigned to: Nobody/Anonymous (nobody)
Summary: subprocess.CalledProcessError uses errno incorrectly

Initial Comment:
I have some code which uses subprocess.check_call(),
which is buried in other code that catches an OSError,
and does different things depending on OSError.errno.
Since subprocess.CalledProcessError overloads errno for
its own return code values, this leads to confusing
error messages.

The return code is NOT an errno, and I do not think
this field should be overloaded in this way.
Additionally, since OSError exceptions generally have
an errno attribute set, and exception-handling code
expects this, I do not think that CalledProcessError
should subclass from it.

----------------------------------------------------------------------

>Comment By: Michael Hoffman (hoffmanm)
Date: 2005-12-08 14:27

Message:
Logged In: YES 
user_id=987664

Ugh, this was supposed to be a bug, not a patch. Is there
anyway to change this or should I just resumbit?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1376309&group_id=5470


More information about the Patches mailing list