Skip to content

Commit

Permalink
fix: normalize returns of get_last_backup function
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGuadrini committed Feb 7, 2024
1 parent 30b52d7 commit e12eef0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bb.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def get_last_backup(catalog):
dates.append(utility.string_to_time(config.get(bid, "timestamp")))
except configparser.NoOptionError:
utility.error(
"Corrupted catalog! No found timestamp in {0}".format(bid)
"Corrupted catalog! No found timestamp in backup: {0}".format(bid)
)
exit(2)
if dates:
Expand All @@ -654,8 +654,10 @@ def get_last_backup(catalog):
and config.get(bid, "timestamp") == last
):
return config.get(bid, "path"), config.get(bid, "os"), bid
else:
return None
else:
return ()
return None


def count_full(config, name):
Expand Down

0 comments on commit e12eef0

Please sign in to comment.