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: 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