mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +00:00
fix: remove unused method and use six to reload module (#875)
* remove download_chart_of_accounts method as it is not being used anywhere * use reload_module from six for flake8 fixes Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
parent
72c70b23bf
commit
d2d577201d
@ -1,11 +1,13 @@
|
||||
import click
|
||||
import sys, os
|
||||
import sys
|
||||
import os
|
||||
from bench.config.common_site_config import get_config, update_config
|
||||
from bench.app import pull_all_apps, is_version_upgrade, validate_branch
|
||||
from bench.utils import (update_bench, validate_upgrade, pre_upgrade, post_upgrade, before_update,
|
||||
update_requirements, update_node_packages, backup_all_sites, patch_sites, build_assets,
|
||||
restart_supervisor_processes, restart_systemd_processes)
|
||||
from bench import patches
|
||||
from six import reload_module
|
||||
|
||||
|
||||
@click.command('update')
|
||||
@ -88,13 +90,8 @@ def _update(pull=False, patch=False, build=False, update_bench=False, auto=False
|
||||
pre_upgrade(version_upgrade[1], version_upgrade[2], bench_path=bench_path)
|
||||
import bench.utils, bench.app
|
||||
print('Reloading bench...')
|
||||
if sys.version_info >= (3, 4):
|
||||
import importlib
|
||||
importlib.reload(bench.utils)
|
||||
importlib.reload(bench.app)
|
||||
else:
|
||||
reload(bench.utils)
|
||||
reload(bench.app)
|
||||
reload_module(bench.utils)
|
||||
reload_module(bench.app)
|
||||
|
||||
if patch:
|
||||
print('Patching sites...')
|
||||
|
@ -727,12 +727,6 @@ def update_translations(app, lang):
|
||||
|
||||
print('downloaded for', app, lang)
|
||||
|
||||
def download_chart_of_accounts():
|
||||
charts_dir = os.path.join('apps', "erpnext", "erpnext", 'accounts', 'chart_of_accounts', "submitted")
|
||||
csv_file = os.path.join(translations_dir, lang + '.csv')
|
||||
url = "https://translate.erpnext.com/files/{}-{}.csv".format(app, lang)
|
||||
r = requests.get(url, stream=True)
|
||||
r.raise_for_status()
|
||||
|
||||
def print_output(p):
|
||||
while p.poll() is None:
|
||||
|
Loading…
Reference in New Issue
Block a user