web change hook: rename exception variable name

Use a more descriptive name of the cought instance of ValueError
exception. The generic 'err' was redefined as a local function
on line 81.

This fixes pylint error 'E0102 (function-redefined)' in this file.
DB Pool: avoid redefining local variable

Instead of redefining the 'log_msg' variable, assign it a new value
when verbose logging is requested.

This fixes pylint error 'E0102 (function-redefined)' in this file.
enable pylint 'E0102 (function-redefined)' check.