blob: d525a548737e38e10d9375650d570ef4c9371136 [file]
def warn(c):
with open('foo.txt', 'rb') as FILE:
if c:
raise ValueError
val = 1
return val # raises UnboundLocalError
def ok(context):
with context as c:
if c:
raise ValueError
val = 1
return val # raises UnboundLocalError