#NEWLINE# def _validate_policy( self , policy_str ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# policy = json . loads ( policy_str ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise ValidationError ( ( _ ( 'The policy is not valid JSON: %s' ) % six . text_type ( e ) ) ) #NEWLINE# #UNINDENT# self . model . validate_policy ( policy ) #NEWLINE# return self