-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly capturing return codes from executed programs (#2)
* Extending ability to capture errors * Pass the env and set Shell to False * Explicilty set env * Correcting name of function * Correctly capturing and reporting return code * Removing unnecessary logging * Bumping Version * Noting return codes in the README.md * Updating description.
- Loading branch information
1 parent
f91ec4c
commit 2ddc059
Showing
6 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Utilities for pychamber.""" | ||
|
||
import logging | ||
import subprocess | ||
|
||
def run_command(command, env): | ||
""" Runs requested process with arguments. | ||
Return: returncode of executed program. | ||
""" | ||
logging.debug("Command: {}".format(command)) | ||
result = subprocess.run(command, env=env, shell=False, capture_output=False) | ||
|
||
return result.returncode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"""Interact with AWS Parameter Store for secrets via boto3.""" | ||
|
||
# Copyright (c) 2018 Bao Nguyen <[email protected]> | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pychamber" | ||
version = "0.1.1" | ||
version = "0.1.3" | ||
description = "" | ||
authors = ["Steve Clarke <[email protected]>"] | ||
readme = "README.md" | ||
|