From 9e7b8d1f2e570a477bbdda22e68c0dd49ef3519a Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Sun, 15 Mar 2020 22:50:52 +0530 Subject: [PATCH] fix: avoid circular imports and optimization --- bench/config/supervisor.py | 3 ++- bench/patches/v5/fix_user_permissions.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bench/config/supervisor.py b/bench/config/supervisor.py index 141e97a6..7b4ff227 100644 --- a/bench/config/supervisor.py +++ b/bench/config/supervisor.py @@ -8,7 +8,6 @@ import bench from bench.app import get_current_frappe_version, use_rq from bench.utils import get_bench_name, find_executable from bench.config.common_site_config import get_config, update_config, get_gunicorn_workers -from bench.config.production_setup import service # imports - third party imports import click @@ -65,6 +64,8 @@ def get_supervisord_conf(): def update_supervisord_conf(user): """From bench v5.0, we're moving to supervisor running as user""" + from bench.config.production_setup import service + supervisord_conf = get_supervisord_conf() or "supervisord.conf" section = "unix_http_server" diff --git a/bench/patches/v5/fix_user_permissions.py b/bench/patches/v5/fix_user_permissions.py index 98a8e327..fba8d9f0 100644 --- a/bench/patches/v5/fix_user_permissions.py +++ b/bench/patches/v5/fix_user_permissions.py @@ -3,7 +3,7 @@ import subprocess import sys # imports - module imports -from bench.utils import log, get_cmd_output, exec_cmd, which +from bench.utils import get_cmd_output, exec_cmd, which from bench.cli import change_uid_msg