ysde / grafana-backup-tool

A Python-based application to backup Grafana settings by using the Grafana API
MIT License
808 stars 269 forks source link

[bug] api check tuple returns lengths are inconsistent #252

Open DerekTBrown opened 6 months ago

DerekTBrown commented 6 months ago

When api_checks.main executes as expected, it returns a 6-tuple:

https://github.com/ysde/grafana-backup-tool/blob/master/grafana_backup/api_checks.py#L48

However, in the error conditions, it returns a 5-tuple:

https://github.com/ysde/grafana-backup-tool/blob/master/grafana_backup/api_checks.py#L14-L24

The caller (save.main) expects a 6-tuple, causing this to crash:

https://github.com/ysde/grafana-backup-tool/blob/master/grafana_backup/save.py#L48-L53