Fix removable storage detect mmcblk error

When we execute removable storage test case and plug USB storage disk,
we will get SD device type becuase the driver attribute is SD.

If we insert SD card, the attribute string should not inlucde 'usb'.
Therefore, we can filter the result.
Insert usb mass storage, the attribute string is like
'usb jetflash/usb-storage/sd 16gb jetflash'
Insert sd card, the attribute string is 'mmcblk'

TEST=manually test, pass removable storage test case with/without SD

Change-Id: I9b6cc764bf52ed129330545f0c6d0cbc74ad4757
Reviewed-by: Cheng-Yi Chiang <>
Commit-Queue: Heng-ruey Hsu <>
Tested-by: Heng-ruey Hsu <>
diff --git a/py/test/pytests/ b/py/test/pytests/
index 5e62ac2..28969cf 100644
--- a/py/test/pytests/
+++ b/py/test/pytests/
@@ -181,6 +181,8 @@
     if device.device_node.find(_UDEV_MMCBLK_PATH) == 0:
       return True
     attr_str = self.GetAttrs(device, set(_CARD_READER_ATTRS)).lower()
+    if 'usb' in attr_str:
+      return False
     for desc in _CARD_READER_DESCS:
       if desc in attr_str:
         return True