Skip to content

Commit

Permalink
wrap in try
Browse files Browse the repository at this point in the history
abbbi committed Oct 10, 2024
1 parent 53f2288 commit fabeacf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qmpbackup
Original file line number Diff line number Diff line change
@@ -270,7 +270,11 @@ async def main():
log.info("Including raw devices in backup operation.")
if argv.level == "full":
if os.path.exists(os.path.join(argv.target, "uuid")):
uuid = lib.get_uuid(argv.target)
try:
uuid = lib.get_uuid(argv.target)
except RuntimeError as errmsg:
log.error("Unable to get backup uuid: [%s]", errmsg)
sys.exit(1)
else:
try:
uuid = lib.save_uuid(argv.target)

0 comments on commit fabeacf

Please sign in to comment.