3
À<×eß ã @ sX d dl mZ d dlT ddlZddlmZ ddlZddlZej j
ƒ ZG dd„ dejƒZ
dS )é )Úbase)Ú*é N)Úcommandsc @ sj e Zd ZdZdd„ Zdd„ Zedd„ ƒZdd „ Zd
d„ Z dd
„ Z
eddd�dd„ ƒZe
dƒddd„ƒZdS )Ú USBPluginaÙ
`usb`::
Sets autosuspend timeout of USB devices to the value specified by the
[option]`autosuspend` option in seconds. If the [option]`devices`
option is specified, the [option]`autosuspend` option applies to only
the USB devices specified, otherwise it applies to all USB devices.
+
The value `0` means that autosuspend is disabled.
+
.To turn off USB autosuspend for USB devices `1-1` and `1-2`
====
----
[usb]
devices=1-1,1-2
autosuspend=0
----
====
c C sN d| _ tƒ | _tƒ | _x*| jjdƒjddƒD ]}| jj|jƒ q,W t ƒ | _
d S )NTÚusbZDEVTYPEZ
usb_device)Z_devices_supportedÚsetZ
_free_devicesZ_assigned_devicesÚ_hardware_inventoryZget_devicesZmatch_propertyÚaddZsys_namer Ú_cmd)ÚselfÚdevice© r ú /usr/lib/python3.6/plugin_usb.pyÚ
_init_devices s zUSBPlugin._init_devicesc s ‡ fdd„|D ƒS )Nc s g | ]}ˆ j jd |ƒ‘qS )r )r Z
get_device)Ú.0Úx)r r r ú