Skip to content

Commit

Permalink
findXenSourceBackups: log any exception caught
Browse files Browse the repository at this point in the history
- it is bad practice to "catch any"
- not logging anything just hides information, which can be especially
  important here as the reason for a try/catch is not obvious (exceptions
  thrown by XenServerBackup.__init__?)

Signed-off-by: Yann Dirson <[email protected]>
  • Loading branch information
ydirson committed Oct 6, 2023
1 parent 51f75da commit 54ae140
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion product.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ def findXenSourceBackups():
(backup.version, THIS_PLATFORM_VERSION))
else:
backups.append(backup)
except:
except Exception as ex:
logger.log("findXenSourceBackups caught exception for partition %s: %s" % (p, ex))
pass
if b:
b.unmount()
Expand Down

0 comments on commit 54ae140

Please sign in to comment.