in cdk/app/awsconfig/S3_block_public_access.py [0:0]
def run_process(command):
try:
process = subprocess.run(
command,
capture_output=True,
shell=True,
encoding='utf-8'
)
except BrokenPipeError as e:
logger.error('Process failed with {}'.format(e))
raise
except Exception as e:
logger.error('Process failed with {}'.format(e))
raise
else:
output = json.loads(process.stdout)
logger.debug('Shell command stdout: {}'.format(output))
return output