waa / baculabackupreport

A highly customizable HTML email report for Bacula environments.
BSD 2-Clause "Simplified" License
15 stars 3 forks source link

the variable "query_str" #4

Closed Jarvx closed 3 years ago

Jarvx commented 3 years ago

https://github.com/waa/bacula/blob/838aa2b10b2d867e1c2eba718ee0d6afab209167/baculabackupreport.py#L802

Hi,

When I was reading your code, I found the the variable '''dbtype''' is an input from the command line. If so, then the line 802 will be an error as the string is not defined when "dbtype" takes a value out of pgsql, mysql maria.

waa commented 3 years ago

Thank you for the comment.

All the important variables have defaults assigned to them, including the dbtype variable.

They may be overridden by environment variables, or on the command line.

If you are using the PostgreSQL backend, the only command line variable required is -e (the email to send the report to), and I think even that may be overridden by an environment variable, so then no command line options are required.

Best regards, Bill