o
    O6uff  ã                   @   s&   d dl mZmZ G dd„ deeƒZdS )é    )ÚPluginÚIndependentPluginc                   @   s(   e Zd ZdZdZdZdd„ Zdd„ ZdS )	ÚPcizPCI devicesÚpci)ÚhardwareÚsystemc                 C   s6   |   d¡sdS |  d¡}d|v r| d¡ t|ƒdkS )z# Check whether PCI devices present ú/proc/bus/pciFÚdevicesr   )Ú
path_isdirÚlistdirÚremoveÚlen)ÚselfÚcontent© r   ú8/usr/lib/python3/dist-packages/sos/report/plugins/pci.pyÚcheck_for_bus_devices   s   


zPci.check_for_bus_devicesc                 C   s8   |   g d¢¡ |  ¡ r| jdddd� |  d¡ d S d S )N)z/proc/ioportsz/proc/iomemr   zlspci -nnvvÚlspci)Úroot_symlinkÚtagsz	lspci -tv)Úadd_copy_specr   Úadd_cmd_output)r   r   r   r   Úsetup   s   ÿýz	Pci.setupN)Ú__name__Ú
__module__Ú__qualname__Ú
short_descÚplugin_nameÚprofilesr   r   r   r   r   r   r      s    r   N)Úsos.report.pluginsr   r   r   r   r   r   r   Ú<module>   s   