fixed verbosity switch for run_as_subprocess()the output now getst voided if the -v flag is not set
This commit is contained in:
@@ -26,9 +26,12 @@ def create_folders(number_folders, base_path, verbosity=False):
|
||||
def execute_as_subprocess(command, base_path, verbosity=False):
|
||||
"""executes the string given with the '-c, --command' flag."""
|
||||
if verbosity:
|
||||
print(base_path)
|
||||
print(command)
|
||||
print(verbosity)
|
||||
subprocess.run(command, cwd=base_path, shell=True)
|
||||
else:
|
||||
subprocess.run(command, cwd=base_path, shell=True)
|
||||
subprocess.run(
|
||||
command,
|
||||
cwd=base_path,
|
||||
shell=True,
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user