def UrlCheck(url):
 uri = urlparse(url)
 if (not (uri.scheme in URI_SCHEMES)):
  raise ValueError((_('Not a valid url: %s') % url))
 else:
  return url

def UrlCheck ( url ) : uri = urlparse ( url ) if ( not ( uri . scheme in URI_SCHEMES ) ) : raise ValueError ( ( _ ( 'Not a valid url: %s' ) % url ) ) else : return url
verify that a url parsed string has a valid uri scheme .