0x1949 Team - FAZEMRX - MANAGER
Edit File: dmi.cpython-310.pyc
o ���f! � @ s� d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dl m Z mZmZm Z e �e�ZdZedg d��Zd ej_i d eddd��d eddd��deddd��deddd��deddd��deddd��deddd��ded d!d��d"ed#d$d��d%ed&d'd(��d)ed*d+d,��d-ed.d/d��d0ed1d2d(��d3ed4d5d6��d7ed8d9d,��d:ed;d<d,��d=ed>d?d��Zd@edAee fdBdC�Zd@edAee fdDdE�Zd@edAee fdFdG�Zd@edHedAee fdIdJ�Zd@edAee fdKdL�ZdMedAefdNdO�ZdS )P� N)� namedtuple)�Optional)�subp)�is_container�is_DragonFlyBSD� is_FreeBSD� is_OpenBSDz/sys/class/dmi/id�KernelNames)�linux�freebsd�openbsd)NNNzbaseboard-asset-tag�board_asset_tagzsmbios.planar.tagzbaseboard-manufacturer�board_vendorzsmbios.planar.makerzbaseboard-product-name� board_namezsmbios.planar.productzbaseboard-serial-number�board_serialzsmbios.planar.serialzbaseboard-version� board_versionzsmbios.planar.versionzbios-release-date� bios_datezsmbios.bios.reldatezbios-vendor�bios_vendorzsmbios.bios.vendorzbios-version�bios_versionzsmbios.bios.versionzchassis-asset-tag�chassis_asset_tagzsmbios.chassis.tagzchassis-manufacturer�chassis_vendorzsmbios.chassis.makerz hw.vendorzchassis-serial-number�chassis_serialzsmbios.chassis.serialzhw.uuidzchassis-version�chassis_versionzsmbios.chassis.versionzsystem-manufacturer� sys_vendorzsmbios.system.makerzsystem-product-name�product_namezsmbios.system.productz hw.productzsystem-serial-number�product_serialzsmbios.system.serialzsystem-uuid�product_uuidzsmbios.system.uuidzsystem-version�product_versionzsmbios.system.version�key�returnc C s t �| �}|du s|jdu rdS d�t|j�}t�d|� tj� |�s+t�d|� dS zt |d��}|�� }W d � n1 s@w Y W n tyV t�d|� Y dS w |dt |�d d kred }z|�d��� W S ty� } zt�d|||� W Y d}~dS d}~ww ) z/ Reads dmi data from /sys/class/dmi/id Nz{0}/{1}�querying dmi data %szdid not find %s�rbzCould not read %s� �� � � �utf8z-utf-8 decode of content (%s) in %s failed: %s)�DMIDECODE_TO_KERNEL�getr �format�DMI_SYS_PATH�LOG�debug�os�path�exists�open�read�PermissionError�len�decode�strip�UnicodeDecodeError�error)r �kmap�dmi_key_path�fp�key_data�e� r= �//usr/lib/python3/dist-packages/cloudinit/dmi.py�_read_dmi_syspathP s>