#NEWLINE# def first_or_raise( it , exc ) : #NEWLINE# #INDENT# for reply in it : #NEWLINE# #INDENT# if ( not isinstance ( reply , Exception ) ) : #NEWLINE# #INDENT# return reply #NEWLINE# #UNINDENT# #UNINDENT# raise exc