Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subprocess.CalledProcessError uses errno incorrectly #42669

Closed
hoffman mannequin opened this issue Dec 8, 2005 · 3 comments
Closed

subprocess.CalledProcessError uses errno incorrectly #42669

hoffman mannequin opened this issue Dec 8, 2005 · 3 comments

Comments

@hoffman
Copy link
Mannequin

hoffman mannequin commented Dec 8, 2005

BPO 1376309

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2006-07-10.20:33:11.000>
created_at = <Date 2005-12-08.14:14:50.000>
labels = []
title = 'subprocess.CalledProcessError uses errno incorrectly'
updated_at = <Date 2006-07-10.20:33:11.000>
user = 'https://bugs.python.org/hoffman'

bugs.python.org fields:

activity = <Date 2006-07-10.20:33:11.000>
actor = 'astrand'
assignee = 'astrand'
closed = True
closed_date = None
closer = None
components = ['None']
creation = <Date 2005-12-08.14:14:50.000>
creator = 'hoffman'
dependencies = []
files = []
hgrepos = []
issue_num = 1376309
keywords = []
message_count = 3.0
messages = ['26999', '27000', '27001']
nosy_count = 2.0
nosy_names = ['astrand', 'hoffman']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1376309'
versions = ['Python 2.5']

@hoffman
Copy link
Mannequin Author

hoffman mannequin commented Dec 8, 2005

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.

@hoffman hoffman mannequin closed this as completed Dec 8, 2005
@hoffman hoffman mannequin assigned astrand Dec 8, 2005
@hoffman
Copy link
Mannequin Author

hoffman mannequin commented Dec 8, 2005

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?

@astrand
Copy link
Mannequin

astrand mannequin commented Jul 10, 2006

Logged In: YES
user_id=344921

Duplicate of 1223937.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants