Skip to content

Commit

Permalink
log warning if qemu block layer returns bitmap without name
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Dec 12, 2024
1 parent 1f14eee commit 42e3331
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions libqmpbackup/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,15 @@ def get_block_devices(blockinfo, argv, excluded_disks, included_disks, uuid):

if len(bitmaps) > 0 and uuid is not None:
for bmap in bitmaps:
if bmap["name"].endswith(uuid):
has_bitmap = True
break
try:
if bmap["name"].endswith(uuid):
has_bitmap = True
break
except KeyError:
log.warning(
"Qemu returned bitmap without name, ignoring entry: [%s]", bmap
)
continue
else:
if len(bitmaps) > 0:
has_bitmap = True
Expand Down

0 comments on commit 42e3331

Please sign in to comment.