Files
codeql/python/ql/examples/snippets/tryfinally.ql
2020-03-30 11:59:10 +02:00

17 lines
301 B
Plaintext

/**
* @id py/examples/tryfinally
* @name Try-finally statements
* @description Finds try-finally statements without an exception handler
* @tags try
* finally
* exceptions
*/
import python
from Try t
where
exists(t.getFinalbody()) and
not exists(t.getAHandler())
select t