Project

General

Profile

Actions

Bug #36701

closed

calling Device.is_valid repeatedly duplicates entries in Device._rejected_reasons

Added by Jan Fajerski over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Device.is_valid only ever adds to _rejected_reason. Two fixes are possible:

- is_valid resets _rejected_reasons on every call
- Don't expose is_valid with the @property decorator. Instead expose the is_valid as a true property and set it on object creation once.

I'd prefer option 2 since we don't expect that property to change once a Device instance is created.

I have the fix ready, unless option 1 is preferable...

Actions

Also available in: Atom PDF