Skip to content
This repository was archived by the owner on Oct 27, 2022. It is now read-only.

Remove the signal.Signals reference (not in 2.7) [#49] #50

Merged
merged 1 commit into from
May 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-----------------
2018-05-21 3.5.1
-----------------
* Fix AttributeError: 'module' object has no attribute 'Signals' when
constructing a CalledProcessError exception. [#49]

-----------------
2018-05-13 3.5.0 (3.5.0rc3)
-----------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main():

setup(
name='subprocess32',
version='3.5.0',
version='3.5.1',
description='A backport of the subprocess module from Python 3 for use on 2.x.',
long_description="""\
This is a backport of the subprocess standard library module from
Expand Down
8 changes: 2 additions & 6 deletions subprocess32.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,8 @@ def __init__(self, returncode, cmd, output=None, stderr=None):

def __str__(self):
if self.returncode and self.returncode < 0:
try:
return "Command '%s' died with %r." % (
self.cmd, signal.Signals(-self.returncode))
except ValueError:
return "Command '%s' died with unknown signal %d." % (
self.cmd, -self.returncode)
return "Command '%s' died with signal %d." % (
self.cmd, -self.returncode)
else:
return "Command '%s' returned non-zero exit status %d." % (
self.cmd, self.returncode)
Expand Down