(else_node, traced)
| 384 | |
| 385 | |
| 386 | def generateElseStatement(else_node, traced): |
| 387 | statements = getStatementsFromBlock(else_node["childSets"]["block"], traced) |
| 388 | if not traced: |
| 389 | return statements |
| 390 | |
| 391 | key = ast.Name(id=SPLOOT_KEY, ctx=ast.Load()) |
| 392 | func = ast.Attribute(value=key, attr="startFrame", ctx=ast.Load()) |
| 393 | else_start_frame = ast.Call( |
| 394 | func, |
| 395 | args=[ |
| 396 | ast.Constant("PYTHON_ELSE_STATEMENT"), |
| 397 | ast.Constant("block"), |
| 398 | ], |
| 399 | keywords=[], |
| 400 | ) |
| 401 | statements.insert(0, ast.Expr(else_start_frame, lineno=1, col_offset=0)) |
| 402 | |
| 403 | key = ast.Name(id=SPLOOT_KEY, ctx=ast.Load()) |
| 404 | func = ast.Attribute(value=key, attr="endFrame", ctx=ast.Load()) |
| 405 | call_end_frame = ast.Call(func, args=[], keywords=[]) |
| 406 | statements.append(ast.Expr(call_end_frame, lineno=1, col_offset=0)) |
| 407 | |
| 408 | return statements |
| 409 | |
| 410 | def generateFromImportStatement(import_node, traced, lineno): |
| 411 | moduleName = import_node['childSets']['module'][0]['properties']['identifier'] |
no test coverage detected