def validate_repoweb(val):
 try:
  (val % {'file': 'file.po', 'line': '9', 'branch': 'master'})
 except Exception as error:
  raise ValidationError((_('Bad format string (%s)') % str(error)))

def validate_repoweb ( val ) : try : ( val % { 'file' : 'file.po' , 'line' : '9' , 'branch' : 'master' } ) except Exception as error : raise ValidationError ( ( _ ( 'Bad format string (%s)' ) % str ( error ) ) )
validates whether url for repository browser is valid and can be filled in using format string .