updated django.edit so taht if coverage is not being used for this project/branch, it won't throw an error looking for it

This commit is contained in:
ronny abraham 2023-07-17 09:05:20 +03:00
parent 9c56c31e61
commit 9b73b9653d

View file

@ -868,21 +868,11 @@ def edit(param='help'):
django_path=django_path,
project_branch=project_branch)
#
# set .coveragerc path and filename
if param == 'coverage':
coverage_test()
file_debug_handler = configuration.logging.django.handlers.file_debug
# locations = ['coverage', 'gunicorn', 'gunicorn_link', 'gunicorn_build',
# 'settings', 'local']
locations = {
'coverage': {
'path': configuration.coverage.config,
'desc': 'coveragerc config file',
},
'gunicorn': {
'path': link_path,
@ -932,6 +922,18 @@ def edit(param='help'):
},
}
#
# set .coveragerc path and filename
# and add a coverage entry to locations
if param == 'coverage':
coverage_test()
locations['coverage'] = {
'path': configuration.coverage.config,
'desc': 'coveragerc config file',
}
if param in locations.keys():
remote_path = locations[param]['path']
maintenance_edit(remote_path=remote_path)