관리-도구
편집 파일: session.cpython-39.pyc
a ��g� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m Z mZ ddlm Z ddlmZmZmZmZ e�d�jZe�e�ZdZe�� deeed�dd ��ZG d d� d�ZG dd � d ee�ZdS )� N)�Mapping�Sequence� )� ssh_errors)�InteractionAgent�InteractionError�InteractionHandler�write_askpass_to_tmpdir�x)�feature�teststr�returnc C sF z*t jdd| � d|� �ddgt jd� W dS t jy@ Y dS 0 d S ) N�ssh�-o� z-GZnonexisting)�stderrTF)� subprocessZcheck_output�DEVNULLZCalledProcessError)r r � r �A/usr/lib/python3.9/site-packages/cockpit/_vendor/ferny/session.py�has_feature% s $r c @ sD e Zd Zee ee d�dd�Zeeef eeef d�dd�ZdS )�SubprocessContext��argsr c C s |S )a� Return the args required to launch a process in the given context. For example, this might return a vector with ["sudo"] or ["flatpak-spawn", "--host"] prepended. It is also possible that more substantial changes may be performed. This function is not permitted to modify its argument, although it may (optionally) return it unmodified, if no changes are required. r ��selfr r r r �wrap_subprocess_args/ s z&SubprocessContext.wrap_subprocess_args)�envr c C s |S )aj Return the envp required to launch a process in the given context. For example, this might set the "SUDO_ASKPASS" environment variable, if needed. As with wrap_subprocess_args(), this function is not permitted to modify its argument, although it may (optionally) return it unmodified if no changes are required. r )r r r r r �wrap_subprocess_env? s z%SubprocessContext.wrap_subprocess_envN)�__name__� __module__�__qualname__r �strr r r r r r r r . s r c @ s� e Zd ZU dZded<