Skip to content

Commit

Permalink
refactor: remove an unnecessary print from the command's flow
Browse files Browse the repository at this point in the history
  • Loading branch information
bra-i-am committed Mar 21, 2024
1 parent ccfb682 commit 2c477f3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ def run_command(self, command: str):
)

output, error = process.communicate()
if process.returncode == 0:
print(f'Commands ran properly!\n{output.decode()}')
else:
# If a command failed
if process.returncode != 0:
raise CommandError(f'Error running command "{command}".\n{output.decode()}\n{error.decode()}')

except subprocess.SubprocessError as error:
raise CommandError(f'Error running command {command}: {error}') from error

0 comments on commit 2c477f3

Please sign in to comment.