def chall_to_challb(chall, status):
 kwargs = {'chall': chall, 'uri': (chall.typ + '_uri'), 'status': status}
 if (status == messages.STATUS_VALID):
  kwargs.update({'validated': datetime.datetime.now()})
 return messages.ChallengeBody(**kwargs)

def chall_to_challb ( chall , status ) : kwargs = { 'chall' : chall , 'uri' : ( chall . typ + '_uri' ) , 'status' : status } if ( status == messages . STATUS_VALID ) : kwargs . update ( { 'validated' : datetime . datetime . now ( ) } ) return messages . ChallengeBody ( ** kwargs )
return challengebody from challenge .