#NEWLINE# @ waiting_effects #NEWLINE# def validatePage( self ) : #NEWLINE# #INDENT# username = str ( self . field ( 'username' ) . toString ( ) ) #NEWLINE# password = str ( self . field ( 'password' ) . toString ( ) ) #NEWLINE# code = str ( self . field ( '2fa_code' ) . toString ( ) ) #NEWLINE# try : #NEWLINE# #INDENT# g = Github ( username , username ) #NEWLINE# user = g . get_user ( ) #NEWLINE# authentication = user . create_authorization ( scopes = [ 'repo' ] , note = 'test' , onetime_password = code ) #NEWLINE# #UNINDENT# except GithubException : #NEWLINE# #INDENT# self . wizard ( ) . back ( ) #NEWLINE# return False #NEWLINE# #UNINDENT# self . setField ( 'token' , str ( authentication . token ) ) #NEWLINE# return True