diff options
author | Papoteur <papoteur@mageia.org> | 2020-01-31 09:19:09 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2020-01-31 09:21:26 +0100 |
commit | 5fe71c7c2c4ff561f0a05c9178fe1a2e7707f0a8 (patch) | |
tree | 711f2a22b251e8a7bd475109666b4e6266ec7b41 /lib/isodumper.py | |
parent | b8d08a76ce939aba0c576543f0e41da2486e54d9 (diff) | |
download | isodumper-5fe71c7c2c4ff561f0a05c9178fe1a2e7707f0a8.tar isodumper-5fe71c7c2c4ff561f0a05c9178fe1a2e7707f0a8.tar.gz isodumper-5fe71c7c2c4ff561f0a05c9178fe1a2e7707f0a8.tar.bz2 isodumper-5fe71c7c2c4ff561f0a05c9178fe1a2e7707f0a8.tar.xz isodumper-5fe71c7c2c4ff561f0a05c9178fe1a2e7707f0a8.zip |
Fix detection of SD cards
The device name is for example mmcblk2. Previously, it was considered that name ending with a number was a partition.
Now, we don't consider a device only if it has 'org.freedesktop.UDisks2.Partition' interface.
Diffstat (limited to 'lib/isodumper.py')
-rwxr-xr-x | lib/isodumper.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py index 5b1801f..4db8e4e 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -81,12 +81,12 @@ class UDisks2(object): list=[] for block in blocks: - if not block['path'][-1].isdigit(): + if not (self.SERVICE + '.Partition' in objects[block['path']]): # we skip partition blocks for dev in devs: - if dev['path'] == objects[block['path']][self.BLOCK]['Drive']: + if dev['path'] == objects[block['path']][self.BLOCK]['Drive']: # we look for device which is referenced in Drive attribute of the current block dev_obj =objects[dev['path']][self.DRIVE] if (dev_obj['ConnectionBus'] == 'usb' or dev_obj['ConnectionBus'] == 'sdio') and \ - (dev_obj['Removable'] == 1 or dev_obj['MediaRemovable'] == 1 ): + (dev_obj['Removable'] == 1 or dev_obj['MediaRemovable'] == 1 ): # we keep only blocks where device ConnectionBus is sdio or usb item=[] vend = dev_obj['Vendor'] if vend == "": |