def RouteProtocolCheck(proto):
 proto = str(proto).strip().lower()
 if (proto not in ('smtp', 'smtptls', 'smtpssl', 'local')):
  raise ValueError((_('Invalid message delivery protocol: %s') % proto))
 return proto

def RouteProtocolCheck ( proto ) : proto = str ( proto ) . strip ( ) . lower ( ) if ( proto not in ( 'smtp' , 'smtptls' , 'smtpssl' , 'local' ) ) : raise ValueError ( ( _ ( 'Invalid message delivery protocol: %s' ) % proto ) ) return proto
verify that the protocol is actually a protocol .