From b291b8438b59f2acff35fee59d54aa35cd61688c Mon Sep 17 00:00:00 2001 From: Nick Rhodes Date: Tue, 27 Nov 2018 10:45:47 +0000 Subject: [PATCH 1/2] Only report skipping default config file when using custom file Unnecessary output which reports incorrectly when using the default configuration file. --- configsnap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configsnap b/configsnap index 38b6296..680e343 100755 --- a/configsnap +++ b/configsnap @@ -503,7 +503,8 @@ if os.path.exists(customcollectionfile): Config.read(customcollectionfile) # Does the default extra config file exist? Warn if yes - if os.path.exists('/etc/configsnap/additional.conf'): + if (os.path.exists('/etc/configsnap/additional.conf') + and customcollectionfile != '/etc/configsnap/additional.conf'): report_info_blue("Default config file /etc/configsnap/" "additional.conf will be ignored, using %s" % customcollectionfile) From da01b11a1f20b16cf45baeb2714220cbb9a319a7 Mon Sep 17 00:00:00 2001 From: Nick Rhodes Date: Tue, 27 Nov 2018 11:19:31 +0000 Subject: [PATCH 2/2] Linebreak after operator - fix for pep8 --- configsnap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configsnap b/configsnap index 680e343..ceda489 100755 --- a/configsnap +++ b/configsnap @@ -503,8 +503,8 @@ if os.path.exists(customcollectionfile): Config.read(customcollectionfile) # Does the default extra config file exist? Warn if yes - if (os.path.exists('/etc/configsnap/additional.conf') - and customcollectionfile != '/etc/configsnap/additional.conf'): + if (os.path.exists('/etc/configsnap/additional.conf') and + customcollectionfile != '/etc/configsnap/additional.conf'): report_info_blue("Default config file /etc/configsnap/" "additional.conf will be ignored, using %s" % customcollectionfile)