Skip to content

Commit

Permalink
Just set stdout=None if verbose is True
Browse files Browse the repository at this point in the history
  • Loading branch information
john-sandall committed Mar 20, 2021
1 parent 481faff commit d524ee8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pipcompilemulti/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,9 @@ def create_lockfile(self):
verbose = True
process = subprocess.Popen(
self.pin_command,
stdout=subprocess.PIPE,
stdout=None if verbose else subprocess.PIPE,
stderr=None if verbose else subprocess.PIPE,
)
if verbose:
while True:
output = process.stdout.readline()
if output == b'' and process.poll() is not None:
break
if output:
print(output.strip())
# TODO: Decide what to do about this
# stdout, stderr = process.poll(), None

stdout, stderr = process.communicate()
finally:
if original_in_file:
Expand Down

0 comments on commit d524ee8

Please sign in to comment.