def validate_thrift_transport(confvar):
  transport = confvar.get()
  error_res = [(confvar, 'Thrift transport %s not supported. Please choose a supported transport: %s' % (transport, ', '.join(SUPPORTED_THRIFT_TRANSPORTS)))]

  if transport not in SUPPORTED_THRIFT_TRANSPORTS:
    return error_res

  return []
Validate that the provided thrift transport is supported.
dataset/ETHPy150Open cloudera/hue/desktop/core/src/desktop/lib/conf.py/validate_thrift_transport