Closes-Bug: #1740063
Add default value None to __new__ method, this avoid exception when __deepcopy__ method used Change-Id: I744d293818e7019a188f9b093d2cf12c47f1f2b4
This commit is contained in:
parent
b3ad6de337
commit
784227cce4
@ -132,7 +132,7 @@ class Constraint(object):
|
|||||||
'less_or_equal', 'in_range', 'valid_values', 'length',
|
'less_or_equal', 'in_range', 'valid_values', 'length',
|
||||||
'min_length', 'max_length', 'pattern')
|
'min_length', 'max_length', 'pattern')
|
||||||
|
|
||||||
def __new__(cls, property_name, property_type, constraint):
|
def __new__(cls, property_name=None, property_type=None, constraint=None):
|
||||||
if cls is not Constraint:
|
if cls is not Constraint:
|
||||||
return super(Constraint, cls).__new__(cls)
|
return super(Constraint, cls).__new__(cls)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user