Skip to content

Commit

Permalink
Chore: Don't log stderr from subcommands when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Apr 10, 2024
1 parent 97816c6 commit 6eae406
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion influxio/util/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def run_command(command: str) -> subprocess.CompletedProcess:
raise
else:
if output:
logger.info(f"Command stderr:\n{output.stderr.decode('utf-8')}")
stderr = output.stderr.decode("utf-8")
if stderr:
logger.info(f"Command stderr:\n{stderr}")
return output


Expand Down

0 comments on commit 6eae406

Please sign in to comment.