bugfix: corrected call to special method __getitem__

This commit is contained in:
Sebastian Wehling 2014-02-19 14:43:56 +01:00
parent 270e3b6d00
commit bddc2ab83e

View File

@ -105,19 +105,19 @@ class AutoPickParameter(object):
try:
for param in args:
try:
return self.__getitem__[param]
return self.__getitem__(param)
except KeyError, e:
self._printParameterError(e)
except TypeError:
try:
return self.__getitem__[args]
return self.__getitem__(args)
except KeyError, e:
self._printParameterError(e)
def setParam(self, **kwargs):
for param, value in kwargs.iteritems():
try:
self.__setitem__[param] = value
self.__setitem__(param, value)
except KeyError, e:
self._printParameterError(e)
print self