code cleanup ... use more /proc/stb/avs/0/* auto functions
[vuplus_dvbapp] / lib / python / Components / Scanner.py
index 95e2e8f..86a5431 100644 (file)
@@ -132,10 +132,10 @@ def scanDevice(mountpoint):
 
        # convert to list
        paths_to_scan = list(paths_to_scan)
-       
+
        from Components.Harddisk import harddiskmanager 
-       blockdev = mountpoint.split('/')[2]
-       error, blacklisted, removable, is_cdrom, partitions = harddiskmanager.getBlockDevInfo(blockdev)
+       blockdev = mountpoint.rstrip("/").rsplit('/',1)[-1]
+       error, blacklisted, removable, is_cdrom, partitions, medium_found = harddiskmanager.getBlockDevInfo(blockdev)
 
        # now scan the paths
        for p in paths_to_scan: