Re: baculabackupreport ini variable quoting issue

Bill Arlofski via Bacula-users <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <[email protected]>
On 2/25/25 5:05 PM, Rob Gerber wrote:
> Bill, I'm adopting your baculabackupreport python script and I've found some strange behavior.
> 
> I have copy and pasted some variables from the script into the ini file. I didn't change many of the ones I pasted in, I more 
> wanted to 'bookmark' them by putting them in the ini file so I could find them easily later if I decided to experiment with 
> them.
> 
> The trouble I've encountered a couple times now is that sometimes the script doesn't like the variables as originally quoted 
> in the script.
> 
> For example, I copied over this variable, exactly as you see it here:
> alwaysfailcolumn = 'jobname'    # Column to colorize for "always failing jobs" (column name, row, none)
> 
> But now the previously correctly working script says this:
> 
> [bacula@td-bacula baculabackupreport]$ /opt/baculabackupreport/email_daily.sh
> - Reading configuration overrides from config file '/opt/baculabackupreport/my.ini', section 'DEFAULT' (if exists), and 
> section 'Daily'
> 
> The 'alwaysfailcolumn' name ''jobname'' not valid or not in cols2show.
> 
> It looks like the script handles the single quoted variables fine when they're in the script itself, but tries to add them 
> when the variable is in the ini. The trouble goes away if I remove the single quote marks.
> 
> Even more weird, other single quoted variables copied from the ini into the script seem to work fine (those variables are 
> also not modified from their default).
> 
> as an example, the script seems fine with this in the ini:
> ignore_jobs_lst = ['Job1', 'Job2']
> or this:
> ignore_warn_on_zero_inc_jobs = 'Job1 Job2'
> 
> This isn't too difficult to work around, and once I have it set up I won't be changing variables much at all, if ever. Still, 
> I thought I'd bring it to your attention as a low priority thing I found.
> 
> I have attached my ini file, just in case you think it's relevant.
> 
> Regards,
> Robert Gerber
> 402-237-8692
> [email protected] <mailto:[email protected]>


Hello Rob... I just looked at your attached config file...

Take a look at line #14 in the notes at the top. :)

----8<----
# - Values must not be quoted (see examples below)
----8<----

I remember running into the problem/issue/question when I started working with the ini file. And I thought I had documented 
it somewhere. I guess I did afterall. :)


Best regards,
Bill

-- 
Bill Arlofski
[email protected]

_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
signature.asc (application/pgp-signature, 583 B)
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail

wsCpBAEBCABdBYJnvl6xCZBIDTDab9XDQDUUAAAAAAAcABBzYWx0QG5vdGF0
aW9ucy5vcGVucGdwanMub3JnvODZTGQlK6hlG2q+gPM9BxYhBMuLnlBaSQiu
SUbb6UgNMNpv1cNAAACuDgf/WDfJj42Us0xtz6coqpYDQKc0ZVrChekFNVMR
zBlKTgPHniST5SSJjy/VSZNj60nS0Bcoglrx/Xcg4JZlQzRQPFpr0/G3Le6p
MJrt2INcyeebKb2vSD7OZDKIT7NnYHcLAcUnSqIxXXqOF90AFl9okg3Kj8bG
+z7GThCRtvLRpjullwwJkZ1/O1eeJLFaAQfLR4jAOjcJB1MqQW+8ikWsBEZ3
kEu0dAnS1cU6rbGoOywoVcCbIaNQfEG7zxeXZ3f4x9JxVvcSOzZVofngGZdO
+cjv5AwcWmtzgi+93/Vnm7vt5FBiqylsnzxEiNcCcZJVuSXaoQ3ZQ8X068sF
W4G/NQ==
=qKf3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.