Hi all
I would like to know how to read from the app.config (.resilient folder) directly from my function code.
I have this last one, the config.py file and the section/options added in the app.config.
What I have to put in my code ?
Right now I use this:
configuration_parameters = {'param1': self.options.get('param1'),
'param2': self.options.get('param2')}
Below I use this logic:
for i, url in enumerate(configuration_parameters.values()):
if "abc" in url:
do_things()
Is this right ? I am asking because I have an error* which, basically, says that the function in my workflow can't retrieve params.
*Error:
FunctionException_: <Traceback (most recent call last): File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/my_function/components/my_function.py", line 159, in _my_function my_function(configuration_parameters) File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/my_function/components/my_function.py", line 56, in above_code if "abc" in url: TypeError: argument of type 'NoneType' is not iterable > File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/circuits/core/manager.py", line 855, in processTask raise value.extract()
Thanks
------------------------------
Bruce Wayne
------------------------------