Python: KeyError because pretty_name may not exist
This commit is contained in:
parent
34846a6644
commit
2c81fceacb
@ -310,7 +310,7 @@ PythonJob::exec()
|
|||||||
scriptNamespace );
|
scriptNamespace );
|
||||||
|
|
||||||
bp::object entryPoint = scriptNamespace[ "run" ];
|
bp::object entryPoint = scriptNamespace[ "run" ];
|
||||||
bp::object prettyNameFunc = scriptNamespace[ "pretty_name" ];
|
bp::object prettyNameFunc = bp::getattr(scriptNamespace, "pretty_name", bp::object());
|
||||||
|
|
||||||
cDebug() << "Job file" << scriptFI.absoluteFilePath();
|
cDebug() << "Job file" << scriptFI.absoluteFilePath();
|
||||||
if ( !prettyNameFunc.is_none() )
|
if ( !prettyNameFunc.is_none() )
|
||||||
|
Loading…
Reference in New Issue
Block a user