Skip to content

Bugfix for NetrcParseError handling

Tanner Prestegard requested to merge tanner.prestegard/lvalert:master into master

Fixes issue generated by the fact that there is no safe_netrc.NetrcParseError, since safe_netrc inherits from netrc.netrc and NetrcParseError is actually directly under the head of the netrc package itself (netrc.NetrcParseError). So we try to catch the standard netrc.NetrcParseError here instead.

Another option to fix this issue would be to explicitly attach a NetrcParseError class to safe_netrc. Up to you if that's preferable to this fix.

Also added a little bit more info to the resulting error, because it wasn't very clear what the issue was from the resulting log messages.

Edited by Tanner Prestegard

Merge request reports