def saltenviron(environ):
 if ('__opts__' not in locals()):
  import salt.config
  __opts__ = salt.config.client_config(os.environ.get('SALT_MASTER_CONFIG', '/etc/salt/master'))
 environ['SALT_OPTS'] = __opts__
 environ['SALT_APIClient'] = salt.netapi.NetapiClient(__opts__)

def saltenviron ( environ ) : if ( '__opts__' not in locals ( ) ) : import salt . config __opts__ = salt . config . client_config ( os . environ . get ( 'SALT_MASTER_CONFIG' , '/etc/salt/master' ) ) environ [ 'SALT_OPTS' ] = __opts__ environ [ 'SALT_APIClient' ] = salt . netapi . NetapiClient ( __opts__ )
make salts opts dict and the apiclient available in the wsgi environ .