2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

fix: use reload only if imported

This commit is contained in:
Sagar Vora 2019-01-29 19:51:12 +05:30 committed by GitHub
parent fd4be52e32
commit 4d02801f53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,10 +381,10 @@ def switch_branch(branch, apps=None, bench_path='.', upgrade=False, check_upgrad
if version_upgrade[0] and upgrade:
if sys.version_info >= (3, 4):
from importlib import reload
reload(utils)
update_requirements()
update_node_packages()
pre_upgrade(version_upgrade[1], version_upgrade[2])
reload(utils)
backup_all_sites()
patch_sites()
build_assets()