forked from ShiftLeftSecurity/shiftleft-python-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtry.py
More file actions
17 lines (16 loc) · 643 Bytes
/
Copy pathtry.py
File metadata and controls
17 lines (16 loc) · 643 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
try:
value = None
except ImportError:
value = 1
"""
if node.orelse:
orelse_last_nodes = self.handle_or_else(node.orelse, try_node)
body.last_statements.extend(orelse_last_nodes)
else:
body.last_statements.append(try_node) # if there is no orelse, test needs an edge to the next_node
if node.finalbody:
finalbody_last_nodes = self.handle_or_else(node.finalbody, try_node)
body.last_statements.extend(finalbody_last_nodes)
else:
body.last_statements.append(try_node) # if there is no orelse, test needs an edge to the next_node
"""