From 9b73b9653da84a30ab40af036d9b250116f92ecd Mon Sep 17 00:00:00 2001 From: ronny abraham Date: Mon, 17 Jul 2023 09:05:20 +0300 Subject: [PATCH] updated django.edit so taht if coverage is not being used for this project/branch, it won't throw an error looking for it --- modules/django.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/django.py b/modules/django.py index e5cdb6c..7166447 100644 --- a/modules/django.py +++ b/modules/django.py @@ -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)