mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
Ensure filename is shown when an exception occurs in a dropped Py script
This commit is contained in:
parent
3ac4fd4ca8
commit
3688035942
@ -976,7 +976,8 @@ def processing_algorithm_from_script(filepath: str):
|
||||
}
|
||||
|
||||
with open(filename.encode(sys.getfilesystemencoding())) as input_file:
|
||||
exec(input_file.read(), _locals)
|
||||
code_object = compile(input_file.read(), filename, 'exec')
|
||||
exec(code_object, _locals)
|
||||
alg_instance = None
|
||||
try:
|
||||
alg_instance = alg.instances.pop().createInstance()
|
||||
|
Loading…
x
Reference in New Issue
Block a user