From 43a7c12d8a52af6e55741a73f271661eed43aead Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Fri, 22 Jul 2011 15:56:38 +0400 Subject: [PATCH] Fix detect usb devices. --- pym/cl_fill_install.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pym/cl_fill_install.py b/pym/cl_fill_install.py index a42a55c..05f061a 100644 --- a/pym/cl_fill_install.py +++ b/pym/cl_fill_install.py @@ -254,8 +254,9 @@ class fillVars(object, glob_attr): device_hash[device] = {} device_hash[device]['table'] = props.get('ID_PART_TABLE_TYPE','') device_hash[device]['map'] = mapnum - if device in usbdevices: - removablePath = '/sys/block/%s/removable'%device + + if path.basename(device) in usbdevices: + removablePath = '/sys/block/%s/removable'%path.basename(device) if os.access(removablePath,R_OK) and \ open(removablePath,'r').read().strip() == "1": devtype = "flash"