diff --git a/bench/templates/supervisor.conf b/bench/templates/supervisor.conf index 96723549..0b1dc8c2 100644 --- a/bench/templates/supervisor.conf +++ b/bench/templates/supervisor.conf @@ -1,5 +1,4 @@ [program:frappe-web] -environment=SITES_PATH='{{ bench_dir }}/sites' command={{ bench_dir }}/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t 120 frappe.app:application autostart=true autorestart=true @@ -7,6 +6,7 @@ stopsignal=QUIT stdout_logfile={{ bench_dir }}/logs/web.log stderr_logfile={{ bench_dir }}/logs/web.error.log user={{ user }} +directory={{ sites_dir }} [program:frappe-worker] command={{ bench_dir }}/env/bin/python -m frappe.celery_app worker diff --git a/bench/utils.py b/bench/utils.py index 1e134019..6a83eb4f 100644 --- a/bench/utils.py +++ b/bench/utils.py @@ -55,7 +55,7 @@ def exec_cmd(cmd, cwd='.'): try: subprocess.check_call(cmd, cwd=cwd, shell=True) except subprocess.CalledProcessError, e: - print "Error:", e.output + print "Error:", getattr(e, "output", None) or getattr(e, "error", None) raise def setup_env(bench='.'):