def clean(self):
        '''Check to make sure password fields match.'''
        cleaned_data = super(SetAccessControlsAction, self).clean()
        if 'admin_pass' in cleaned_data:
            if cleaned_data['admin_pass'] != cleaned_data.get(
                    'confirm_admin_pass', None):
                raise forms.ValidationError(_('Passwords do not match.'))
        return cleaned_data
def clean ( self ) : cleaned_data = super ( SetAccessControlsAction , self ) . clean ( ) if 'admin_pass' in cleaned_data : if cleaned_data [ 'admin_pass' ] != cleaned_data . get ( 'confirm_admin_pass' , None ) : raise forms . ValidationError ( _ ( 'Passwords do not match.' ) ) return cleaned_data
Check to make sure password fields match.