Correct code error in 'build job runner' tutorial

When  __init__ is called, **kwargs (most likely) will not contain
the 'runner_param_specs' key. And if so, calling update() on
kwargs['runner_param_specs'] will cause an error. Check if key exists,
then update or create.
This commit is contained in:
Sergey Golitsynskiy
2018-12-21 12:42:25 -05:00
parent 288453d4d0
commit 5d8e0bb049
+4 -1
View File
@@ -120,7 +120,10 @@ B: Update the dictionary structure in kwargs.
::
kwargs['runner_param_specs'].update(runner_param_specs)
if 'runner_param_specs' in kwargs:
kwargs['runner_param_specs'].update(runner_param_specs)
else:
kwargs['runner_param_specs'] = runner_param_specs
C: Now call the parent constructor to assign the values.