bugfix: corrected call to special method __getitem__
This commit is contained in:
parent
270e3b6d00
commit
bddc2ab83e
@ -105,19 +105,19 @@ class AutoPickParameter(object):
|
|||||||
try:
|
try:
|
||||||
for param in args:
|
for param in args:
|
||||||
try:
|
try:
|
||||||
return self.__getitem__[param]
|
return self.__getitem__(param)
|
||||||
except KeyError, e:
|
except KeyError, e:
|
||||||
self._printParameterError(e)
|
self._printParameterError(e)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
try:
|
try:
|
||||||
return self.__getitem__[args]
|
return self.__getitem__(args)
|
||||||
except KeyError, e:
|
except KeyError, e:
|
||||||
self._printParameterError(e)
|
self._printParameterError(e)
|
||||||
|
|
||||||
def setParam(self, **kwargs):
|
def setParam(self, **kwargs):
|
||||||
for param, value in kwargs.iteritems():
|
for param, value in kwargs.iteritems():
|
||||||
try:
|
try:
|
||||||
self.__setitem__[param] = value
|
self.__setitem__(param, value)
|
||||||
except KeyError, e:
|
except KeyError, e:
|
||||||
self._printParameterError(e)
|
self._printParameterError(e)
|
||||||
print self
|
print self
|
||||||
|
Loading…
Reference in New Issue
Block a user