관리-도구
편집 파일: hardware_hal.cpython-36.opt-1.pyc
3 e�$gE- � @ sH d Z ddlmZmZ ddlZdZdZdZdZdZ dZ dZdZdZ dZdZdZdZdZdZdZdZdZdZdZdZdZdZd ZdZdZdZdZ dZ!d Z"d Z#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,d Z-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9d Z:dd� Z;dd� Z<dd� Z=dd� Z>dd� Z?dd� Z@dd� ZAdd� ZBdd � ZCd!d"� ZDdS )#z Get hardware info using HAL � )�HalTree� HalDeviceN� � � � �P � � � � � � c C s� g } t j� }|jdd�}t j|d�}|j� }t� }x>|D ]6}|jd|�}t j|d�}|j� } t| �} |j| � q8W t |j �}|S )Nzorg.freedesktop.Halz/org/freedesktop/Hal/Managerzorg.freedesktop.Hal.Managerzorg.freedesktop.Hal.Device)�dbus� SystemBus� get_object� InterfaceZ GetAllDevicesr ZGetAllPropertiesr �add�process_hal_nodes�head)�ret�busZhal_manager_objZhal_managerZdevice_listZhal_treeZudiZ device_obj�device� propertiesZhaldev� kudzu_list� r �"/usr/lib/python3.6/hardware_hal.py�read_hal\ s r c C s& g }t | �| _| jr�| j}i }| j|d<