Skip to content

Commit cb245c6

Browse files
Andy Groverstratakis
authored andcommitted
python3: getstatusoutput() moved to subprocess module
py3 eliminates the commands module but supports getstatusoutput() via the subprocess module. This change enables py3 but keeps py2 compatibility. Signed-off-by: Andy Grover <agrover@redhat.com>
1 parent 048faa6 commit cb245c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
from __future__ import print_function
44

55
from distutils.core import setup, Extension
6-
import commands
6+
try:
7+
import commands
8+
except ImportError:
9+
import subprocess as commands
710
import sys
811

912
version = '0.11'

0 commit comments

Comments
 (0)