def _get_server_root(config):
 subdirs = [name for name in os.listdir(config) if os.path.isdir(os.path.join(config, name))]
 if (len(subdirs) != 1):
  errors.Error('Malformed configuration directory {0}'.format(config))
 return os.path.join(config, subdirs[0].rstrip())

def _get_server_root ( config ) : subdirs = [ name for name in os . listdir ( config ) if os . path . isdir ( os . path . join ( config , name ) ) ] if ( len ( subdirs ) != 1 ) : errors . Error ( 'Malformed configuration directory {0}' . format ( config ) ) return os . path . join ( config , subdirs [ 0 ] . rstrip ( ) )
returns the server root directory in config .