ease cd-rom detection by using global harddiskmanager
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>
Wed, 8 Oct 2008 15:43:05 +0000 (15:43 +0000)
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>
Wed, 8 Oct 2008 15:43:05 +0000 (15:43 +0000)
lib/python/Components/Scanner.py

index c217aa5..e13370b 100644 (file)
@@ -129,13 +129,9 @@ def scanDevice(mountpoint):
        # convert to list
        paths_to_scan = list(paths_to_scan)
        
        # convert to list
        paths_to_scan = list(paths_to_scan)
        
-       from Components.Harddisk import HarddiskManager 
-       class CdromManager(HarddiskManager):
-               def __init__(self):
-                       pass
-       cdaman = CdromManager()
+       from Components.Harddisk import harddiskmanager 
        blockdev = mountpoint.split('/')[2]
        blockdev = mountpoint.split('/')[2]
-       error, blacklisted, removable, is_cdrom, partitions = cdaman.getBlockDevInfo(blockdev)
+       error, blacklisted, removable, is_cdrom, partitions = harddiskmanager.getBlockDevInfo(blockdev)
 
        # now scan the paths
        for p in paths_to_scan:
 
        # now scan the paths
        for p in paths_to_scan: