If a user imports a module and invokes a method on it, a raw Python exception is raised to the user. This commit adds a check to ensure that in this case an appropriate exception is raised instead. A test has been added to ensure that this exception is in fact raised on offending code. Fixes: #11393, #5134pull/13491/head
parent
050b788ed8
commit
74dd77ed81
3 changed files with 18 additions and 1 deletions
@ -0,0 +1,6 @@ |
||||
# GH issue 11393 |
||||
project('module use inside project decl', 'c', |
||||
version: run_command( |
||||
import('python').find_installation('python3') |
||||
) |
||||
) |
@ -0,0 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/132 module use inside project decl/meson.build:4:21: ERROR: Module methods (python.find_installation) cannot be invoked during project declaration." |
||||
} |
||||
] |
||||
} |
Loading…
Reference in new issue