def raise_cmdexc_if_invalid(url):
 if (not url.isValid()):
  raise cmdexc.CommandError(get_errstring(url))

def raise_cmdexc_if_invalid ( url ) : if ( not url . isValid ( ) ) : raise cmdexc . CommandError ( get_errstring ( url ) )
check if the given qurl is invalid .