2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-24 04:59:01 +00:00

chore: added logging and removed unnecessary print in

get_cmd_output
This commit is contained in:
Gavin D'souza 2020-03-15 19:32:46 +05:30
parent e12208dc25
commit f6292bba77

View File

@ -437,6 +437,7 @@ def setup_sudoers(user):
f.write(frappe_sudoers) f.write(frappe_sudoers)
os.chmod(sudoers_file, 0o440) os.chmod(sudoers_file, 0o440)
log("Sudoers was set up for user {}".format(user), level=1)
def setup_logging(bench_path='.'): def setup_logging(bench_path='.'):
@ -510,7 +511,6 @@ def check_git_for_shallow_clone():
def get_cmd_output(cmd, cwd='.'): def get_cmd_output(cmd, cwd='.'):
print("{0}$ {1}{2}".format(color.silver, cmd, color.nc))
try: try:
output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.PIPE).strip() output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.PIPE).strip()
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e: