관리-도구
편집 파일: hardware.cpython-36.opt-1.pyc
3 e�$g� � D @ sJ d Z ddlmZmZmZmZ ddlZddlZddlZddlZddl m Z ddl mZ ddl mZ ddl mZ ye W n ek r� eZY nX yddlZdZW n ek r� d ZY nX yddlZddlZdZW n ek r� d ZY nX ddlZejd dd�Zeed��seje_ejZddlZejd dg�� ddl Z W dQ R X ddl m!Z! yddl"m#Z#m$Z$ dZ%W n^ ek �r� yddl&m#Z#m$Z$ dZ%W n. ek �r� ddl'm(Z(m)Z)m*Z* dZ%Y nX Y nX yddl+Z+W n ek �r� dZ+Y nX ej,j-d� yddl.m/Z0 dZ1W n ek �r* d Z1Y nX da2da3dd� Z4e4� Z5e5�rfe j6� e!j7� Z8e8j9de5 � dd� Z:dd� Z;dd� Z<dd� Z=d d!� Z>d"d#� Z?d$d%� Z@d&d'� ZAd(d)� ZBd*d+� ZCd,d-� ZDd.d/� ZEd0d1� ZFd2d3� ZGd4d5� ZHd6d7� ZId8d9� ZJd:d;� ZKd<d=� Z/eLd>k�rFx<e/� D ]2ZMx&eMjN� D ]ZOePd?eOeMeO f � �qW eP �qW dS )@z1Used to read hardware info from kudzu, /proc, etc� )�gethostname�getaddrinfo�AF_INET�AF_INET6N)�config)� rhnserver)�up2dateUtils)�ustrTFzrhn-client-tools)Zfallback�ugettextzFailed to save log entryzSMBIOS.*: entry point at)� up2dateLog)�get_devices�get_computer_info� )�check_hal_dbus_status�get_hal_computer�read_halz/usr/share/rhsm)�Hardwarec C s t td�sd S tj� S )N�get_warnings)�hasattr� dmidecoder � r r �/usr/lib/python3.6/hardware.py�dmi_warnings[ s r z.Warnings collected during dmidecode import: %sc C s� t dkr�trdS tj� } | jtj� y6| jd�}t� }|rXtj� t j � }|jd| � W n dat� }|rxtj� dS |j� a t S )z= Initialize _dmi_data unless it already exist and returns it N�allzdmidecode warnings: %sr ) � _dmi_data�_dmi_not_availabler ZdmidecodeXMLZ SetResultTypeZ DMIXML_DOCZQuerySectionr �clear_warningsr �initLog� log_debugZxpathNewContext)Zdmixml�data�dmi_warn�logr r r �_initialize_dmi_datag s( r"