Skip to content

Commit

Permalink
fix: change last backup selection into get_last_backup function, refs #7
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGuadrini committed Jan 2, 2025
1 parent 97a38a9 commit b3f075c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release notes

## 1.13.0
Jan 02, 2025
* Fix return of **get_last_backup** function for incremental and differential backup, refs #7

## 1.12.0
May 24, 2024
* Add **--no-color** argument
Expand Down
13 changes: 9 additions & 4 deletions bb.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
import utility

# region Global Variables
VERSION = "1.12.0"
VERSION = "1.13.0"


# endregion
Expand Down Expand Up @@ -600,7 +600,7 @@ def get_last_full(catalog):
:param catalog: configparser object
:return: path (string), os (string)
"""
global hostname
global hostname, args

config = catalog
if config:
Expand All @@ -627,7 +627,7 @@ def get_last_full(catalog):
if last_full:
utility.print_verbose(
args.verbose,
"Last full is {0}".format(last_full),
"Last full backup is {0}".format(last_full),
nocolor=args.color,
)
for bid in config.sections():
Expand All @@ -648,7 +648,7 @@ def get_last_backup(catalog):
:param catalog: configparser object
:return: path (string), os (string)
"""
global hostname
global hostname, args

config = catalog
dates = []
Expand All @@ -672,6 +672,11 @@ def get_last_backup(catalog):
dates.sort()
last = utility.time_to_string(dates[-1])
if last:
utility.print_verbose(
args.verbose,
"Last backup is {0}".format(last),
nocolor=args.color,
)
for bid in config.sections():
if (
config.get(bid, "name") == hostname and
Expand Down

0 comments on commit b3f075c

Please sign in to comment.