Python: KeyError because pretty_name may not exist
This commit is contained in:
parent
34846a6644
commit
2c81fceacb
@ -310,7 +310,7 @@ PythonJob::exec()
|
||||
scriptNamespace );
|
||||
|
||||
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();
|
||||
if ( !prettyNameFunc.is_none() )
|
||||
|
Loading…
Reference in New Issue
Block a user