[EDIT] FILE: license.cpython-311.pyc
� �ij�* � �@ � d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ d dlm Z m Z mZ d dlm Z mZmZ d dlZd dlmZmZ d dlmZ dd lmZ ej d � � ZdZdZd efd�Z ddee dee dee d dfd�Z ded efd�Z! G d� d� � Z"dS )� N)�JSONDecodeError)�Path)�PIPE�STDOUT�run)�Dict�Optional�Union)�print_dictionary�replace_params)�CloudlinuxLicenseLib� )�parse_cloudlinux_packages_optszcloudlinux-licensez/usr/sbin/clnreg_ksz--activationkey=-�returnc �� � t t dgt t d�� � } n# t t f$ r Y dS w xY wt � � � | j pdv S )a� Return True if the installed clnreg_ks advertises the --activationkey=- sentinel. Probed via `clnreg_ks --help` (which forwards to `rhnreg_ks --help`); the literal `--activationkey=-` is a locale-stable option token (translators preserve option syntax), so the check is robust. stderr is merged into stdout in case the help text is emitted there. Best-effort: any failure to probe is treated as "unsupported" and the caller falls back to the legacy argv form. z--helpF)�stdout�stderr�check� ) r � CLNREG_KSr r �OSError� ValueError�ACTIVATIONKEY_STDIN�encoder )�results �py/cllicense/license.py�_clnreg_supports_stdin_keyr # si � ���i��*�4��e�T�T�T�����Z� � � � ��u�u������%�%�'�'�F�M�,@�S�A�As �$'