Issue 1376309: subprocess.CalledProcessError uses errno incorrectly (original) (raw)
Issue1376309
Created on 2005-12-08 14:14 by hoffman, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg26999 - (view) | Author: Michael Hoffman (hoffman) | Date: 2005-12-08 14:14 |
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. | ||
msg27000 - (view) | Author: Michael Hoffman (hoffman) | Date: 2005-12-08 14:27 |
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? | ||
msg27001 - (view) | Author: Peter Åstrand (astrand) * ![]() |
Date: 2006-07-10 20:33 |
Logged In: YES user_id=344921 Duplicate of 1223937. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:14 | admin | set | github: 42669 |
2005-12-08 14:14:50 | hoffman | create |