Comments
Patch
@@ -588,7 +588,7 @@
"""
def __init__(self, parttype, mandatoryparams=(), advisoryparams=(),
- data='', mandatory = 'UNSPECIFIED'):
+ data='', mandatory = False):
self.id = None
self.type = parttype
self._data = data
@@ -605,10 +605,7 @@
# - False: currently generated,
# - True: generation done.
self._generated = None
- if mandatory is 'UNSPECIFIED':
- self._mandatory = None
- else:
- self._mandatory = bool(mandatory)
+ self._mandatory = bool(mandatory)
# methods used to defines the part content
def __setdata(self, data):
@@ -631,11 +628,7 @@
@property
def mandatory(self):
- if self._mandatory is None:
- # remove this autodetect once everything uses the new API
- return self.type != self.type.lower()
- else:
- return self._mandatory
+ return self._mandatory
@mandatory.setter
def mandatory(self, value):