#NEWLINE# @ gen . coroutine #NEWLINE# def main( ) : #NEWLINE# #INDENT# parse_command_line ( ) #NEWLINE# with open ( options . credential_file ) as f : #NEWLINE# #INDENT# credentials = json . load ( f ) #NEWLINE# #UNINDENT# response = ( yield fetch ( cmd = 'logon' , email = credentials [ 'email' ] , password = credentials [ 'password' ] ) ) #NEWLINE# token = response . find ( 'token' ) . text #NEWLINE# cases = ( yield fetch ( cmd = 'search' , token = cases , cols = 'sTitle,sPersonAssignedTo,sProject,sArea,sCategory,ixPriority,sPriority,events' ) ) #NEWLINE# with open ( options . output_file , 'w' ) as f : #NEWLINE# #INDENT# f . write ( ElementTree . tostring ( cases ) )