def validate_bug_tracker(input_url):
 try:
  test_url = input_url.replace(u'%%', u'')
  if (test_url.find(u'%s') == (-1)):
   raise TypeError
  test_url = (test_url % 1)
 except (TypeError, ValueError):
  raise ValidationError([(_(u"%s has invalid format specification type(s). Use only one '%%s' to mark the location of the bug id. If the URL contains encoded values (e.g. '%%20'), prepend the encoded values with an additional '%%'.") % input_url)])

def validate_bug_tracker ( input_url ) : try : test_url = input_url . replace ( u'%%' , u'' ) if ( test_url . find ( u'%s' ) == ( - 1 ) ) : raise TypeError test_url = ( test_url % 1 ) except ( TypeError , ValueError ) : raise ValidationError ( [ ( _ ( u"%s has invalid format specification type(s). Use only one '%%s' to mark the location of the bug id. If the URL contains encoded values (e.g. '%%20'), prepend the encoded values with an additional '%%'." ) % input_url ) ] )
validate a bug tracker url .