Skip to content

Commit

Permalink
cms.optional and obsolete now return None from call to value()
Browse files Browse the repository at this point in the history
WMAgent code was failing when dealing with the new optional and
obsolete parameter types. The code was always calling value()
which was not available on parameters which were not set.
  • Loading branch information
Dr15Jones committed Jul 7, 2019
1 parent 55674c6 commit 07fff50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FWCore/ParameterSet/python/Types.py
Expand Up @@ -95,6 +95,11 @@ def insertInto(self, parameterSet, myname):
v = self.__dict__.get('_ProxyParameter__value', None)
if v is not None:
v.insertInto(parameterSet,myname)
def value(self):
v = self.__dict__.get('_ProxyParameter__value', None)
if v is not None:
return v.value()
return None

class _ObsoleteParameter(_OptionalParameter):
@staticmethod
Expand Down

0 comments on commit 07fff50

Please sign in to comment.