def path_for_host(host, environ=None):
 if (environ is None):
  environ = os.environ
 for kv_pair in environ['MOCK_SSH_ROOTS'].split(':'):
  (this_host, this_path) = kv_pair.split('=')
  if (this_host == host):
   return os.path.abspath(this_path)
 raise KeyError(('Host %s is not specified in $MOCK_SSH_ROOTS (%s)' % (host, environ['MOCK_SSH_ROOTS'])))

def path_for_host ( host , environ = None ) : if ( environ is None ) : environ = os . environ for kv_pair in environ [ 'MOCK_SSH_ROOTS' ] . split ( ':' ) : ( this_host , this_path ) = kv_pair . split ( '=' ) if ( this_host == host ) : return os . path . abspath ( this_path ) raise KeyError ( ( 'Host %s is not specified in $MOCK_SSH_ROOTS (%s)' % ( host , environ [ 'MOCK_SSH_ROOTS' ] ) ) )
get the filesystem path that the given host is being faked at .