PyAPI: remove use of BaseException
BaseException was used as a catch-all in situations where it didn't make sense and where "Exception" is more appropriate based on Python's documentation & error checking tools, `pylint` warns `broad-exception-caught` for e.g. BaseException includes SystemExit, KeyboardInterrupt & GeneratorExit, so unless the intention is to catch calls to `sys.exit(..)`, breaking a out of a loop using Ctrl-C or generator-exit, then it shouldn't be used. Even then, it's preferable to catch those exceptions explicitly.
This commit is contained in:
@@ -92,7 +92,7 @@ class _TestExprMixIn:
|
||||
)
|
||||
# exec(expr_code, {}, bpy.app.driver_namespace)
|
||||
ex = None
|
||||
except BaseException as ex_test:
|
||||
except Exception as ex_test:
|
||||
ex = ex_test
|
||||
|
||||
if self.expressions_expect_unreachable:
|
||||
|
||||
Reference in New Issue
Block a user