Skip to content

Commit

Permalink
Fix #81 for Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Apr 8, 2020
1 parent c07c125 commit f107912
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pip_review/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
import json
import sys
import pip
import subprocess
from packaging import version

PY3 = sys.version_info.major == 3
if PY3: # Python3 Imports
import subprocess

def check_output(*args, **kwargs):
process = subprocess.Popen(stdout=subprocess.PIPE, *args, **kwargs)
output, _ = process.communicate()
Expand All @@ -23,7 +22,6 @@ def check_output(*args, **kwargs):
return output

else: # Python2 Imports
import urllib2 as urllib_request
from subprocess import check_output
import __builtin__
input = getattr(__builtin__, 'raw_input')
Expand Down

0 comments on commit f107912

Please sign in to comment.