Skip to content

Commit

Permalink
consolidate variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam-D-Lewis committed Sep 3, 2024
1 parent 012a75d commit 30d130f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/_nebari/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ def run_subprocess_cmd(processargs, prefix=b"", capture_output=False, **kwargs):

if capture_output:
stderr_stream = subprocess.PIPE
print_stream = process.stderr
else:
stderr_stream = subprocess.STDOUT
print_stream = process.stdout

timeout = 0
if "timeout" in kwargs:
Expand Down Expand Up @@ -84,7 +86,6 @@ def kill_process():
timeout_timer = threading.Timer(timeout, kill_process)
timeout_timer.start()

print_stream = process.stderr if capture_output else process.stdout
for line in iter(lambda: print_stream.readline(), b""):
full_line = line_prefix + line
if strip_errors:
Expand Down

0 comments on commit 30d130f

Please sign in to comment.