Missing error handling for invalid lock file content #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Missing error handling for invalid lock file content
Priority: Medium
Component: backup.py
Type: Bug
Description
The lock file parsing in
set_backups_lock()assumes the file contains a valid integer, but there's no error handling if the file is corrupted or contains non-numeric data.Location
curateipsum/backup.py:114-115Current Code
Problem
If the lock file is corrupted or empty,
int()will raise aValueError, causing the backup to crash rather than handling the situation gracefully.Proposed Solution
Impact
Medium - Can cause backup process to crash if lock file is corrupted.