debfx / check_dane

Nagios/Icinga plugin for checking DANE/TLSA records
GNU General Public License v3.0
13 stars 9 forks source link

Fix stack trace when cert is about to expire #4

Closed nemunaire closed 8 years ago

nemunaire commented 8 years ago

check_cert_expiry requires args parameter to display errors; this pull request prepend args to the arguments passed to the function.

Traceback (most recent call last):
  File "./check_dane", line 351, in <module>
    main()
  File "./check_dane", line 335, in main
    timedelta_valid = check_cert_expiry(cert_dict, int(days_parts[0]), int(days_parts[1]))
  File "./check_dane", line 137, in check_cert_expiry
    nagios_warning("{}:{} cert expires in {} days".format(args.host, args.port, date_diff.days))
NameError: name 'args' is not defined
debfx commented 8 years ago

Merged, thanks!