def convert(self, value, param, ctx):
        """Convert to URL scheme."""
        if not isinstance(value, tuple):
            parsed = urlparse.urlparse(value)
            if parsed.scheme not in ('telnet', 'ssh'):
                self.fail('invalid URL scheme (%s).  Only telnet and ssh URLs are '
                          'allowed' % parsed, param, ctx)
        return value
def convert ( self , value , param , ctx ) : if not isinstance ( value , tuple ) : parsed = urlparse . urlparse ( value ) if parsed . scheme not in ( 'telnet' , 'ssh' ) : self . fail ( 'invalid URL scheme (%s).  Only telnet and ssh URLs are ' 'allowed' % parsed , param , ctx ) return value
Convert to URL scheme.