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

Commit 9647763

Browse files
authored
Remove the signal.Signals reference (not in 2.7). (#50)
Constructing a CalledProcessError when the process died due to a signal could raise an AttributeError due to this bug. github issue #49.
1 parent 99ba0dd commit 9647763

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
-----------------
2+
2018-05-21 3.5.1
3+
-----------------
4+
* Fix AttributeError: 'module' object has no attribute 'Signals' when
5+
constructing a CalledProcessError exception. [#49]
6+
17
-----------------
28
2018-05-13 3.5.0 (3.5.0rc3)
39
-----------------

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def main():
6666

6767
setup(
6868
name='subprocess32',
69-
version='3.5.0',
69+
version='3.5.1',
7070
description='A backport of the subprocess module from Python 3 for use on 2.x.',
7171
long_description="""\
7272
This is a backport of the subprocess standard library module from

subprocess32.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,8 @@ def __init__(self, returncode, cmd, output=None, stderr=None):
6767

6868
def __str__(self):
6969
if self.returncode and self.returncode < 0:
70-
try:
71-
return "Command '%s' died with %r." % (
72-
self.cmd, signal.Signals(-self.returncode))
73-
except ValueError:
74-
return "Command '%s' died with unknown signal %d." % (
75-
self.cmd, -self.returncode)
70+
return "Command '%s' died with signal %d." % (
71+
self.cmd, -self.returncode)
7672
else:
7773
return "Command '%s' returned non-zero exit status %d." % (
7874
self.cmd, self.returncode)

0 commit comments

Comments
 (0)