We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 530a260 commit 59ec7a9Copy full SHA for 59ec7a9
src/pybind/mgr/snap_schedule/fs/schedule.py
@@ -364,9 +364,9 @@ def add_retention(cls,
364
current_retention = json.loads(current)
365
for r, v in retention.items():
366
if r in current_retention:
367
- msg = (f'Retention for {r} is already present with value'
368
- f'{current_retention[r]}. Please remove first')
369
- raise ValueError(msg)
+ msg = (f'Retention for {r} is already present with value '
+ f'{current_retention[r]}. Please remove it first.')
+ raise FileExistsError(msg)
370
current_retention.update(retention)
371
db.execute(cls.UPDATE_RETENTION,
372
(json.dumps(current_retention), path))
0 commit comments