summaryrefslogtreecommitdiffstats
path: root/jenkins_jobs/config.py
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2018-05-30 16:27:07 -0400
committerDaniel Watkins <daniel.watkins@canonical.com>2018-05-30 16:27:07 -0400
commit3e72803eec840e582ac526b99344475d758de38e (patch)
tree103f7d0e83ff9f82bdee7fd9c1291353902422da /jenkins_jobs/config.py
parent307c09cff3ef030a72859cdc63ce555810af486d (diff)
downloadpython-jenkins-job-builder-3e72803eec840e582ac526b99344475d758de38e.tar.gz
python-jenkins-job-builder-3e72803eec840e582ac526b99344475d758de38e.tar.xz
python-jenkins-job-builder-3e72803eec840e582ac526b99344475d758de38e.zip
Make the deprecated plugin config messaging clearer
At the moment, if you don't know that you have configuration for the given plugin in your config file, there's nothing that actually suggests that's where you should start looking to fix this. Change-Id: I32481eb9b1a4feafc8b8ca2cec63e4b9a0b29441 Story: 2001735 Task: 12090
Diffstat (limited to 'jenkins_jobs/config.py')
-rw-r--r--jenkins_jobs/config.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/jenkins_jobs/config.py b/jenkins_jobs/config.py
index 7b0c2a1d..c4e63807 100644
--- a/jenkins_jobs/config.py
+++ b/jenkins_jobs/config.py
@@ -51,6 +51,11 @@ query_plugins_info=False
CONFIG_REQUIRED_MESSAGE = ("A valid configuration file is required. "
"No configuration file passed.")
+DEPRECATED_PLUGIN_CONFIG_SECTION_MESSAGE = (
+ "Defining plugin configuration using a [{plugin}] section in your config"
+ " file is deprecated. The recommended way to define plugins now is by"
+ " using a [plugin \"{plugin}\"] section"
+)
_NOTSET = object()
@@ -353,8 +358,6 @@ class JJBConfig(object):
if old_value is not _NOTSET:
value = old_value
logger.warning(
- "Defining plugin configuration using [" + plugin + "] is "
- "deprecated. The recommended way to define plugins now is "
- "by configuring [plugin \"" + plugin + "\"]")
-
+ DEPRECATED_PLUGIN_CONFIG_SECTION_MESSAGE.format(
+ plugin=plugin))
return value