AlkantarClanX12

Your IP : 3.133.157.231


Current Path : /lib64/python3.6/site-packages/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/__pycache__/dmidecode.cpython-36.pyc

3

��uc�
�@s*ddlZddlTdZdZGdd�d�ZdS)�N)�*�n�dc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�dmidecodeXMLz=Native Python API for retrieving dmidecode information as XMLcCs
t|_dS)N)�DMIXML_NODE�restype)�self�r	�!/usr/lib64/python3.6/dmidecode.py�__init__%szdmidecodeXML.__init__cCs,|tkrt|_n|tkr t|_ntd��dS)z�
        Sets the result type of queries.  The value can be DMIXML_NODE or DMIXML_DOC,
        which will return an libxml2::xmlNode or libxml2::xmlDoc object, respectively
        zInvalid result type valueT)rr�
DMIXML_DOC�	TypeError)r�typer	r	r
�
SetResultType(szdmidecodeXML.SetResultTypecCsT|jtkr$tjtd|j|d�d�}n,|jtkrHtjtd|j|d�d�}ntd��|S)z�
        Queries the DMI data structure for a given section name.  A section
        can often contain several DMI type elements
        �s)�
query_type�result_typeZsection)�_objzInvalid result type value)rr�libxml2�xmlNode�xmlapir�xmlDocr
)rZsectname�retr	r	r
�QuerySection6s

zdmidecodeXML.QuerySectioncCsT|jtkr$tjtd|j|d�d�}n,|jtkrHtjtd|j|d�d�}ntd��|S)zI
        Queries the DMI data structure for a specific DMI type.
        �t)rrZtypeid)rzInvalid result type value)rrrrrrrr
)rZtpidrr	r	r
�QueryTypeIdIs

zdmidecodeXML.QueryTypeIdN)�__name__�
__module__�__qualname__�__doc__rrrrr	r	r	r
r"s
r)rZdmidecodemodrrrr	r	r	r
�<module>s