File diff d1a9a47788f8 → 03b0b1263122
devices/__init__.py
Show inline comments
 
@@ -15,15 +15,15 @@ def get_storage_devices(removable=None, 
 

	
 
    if proc.wait() == 0:
 
        result = proc.stdout.read()
 
        result = json.loads(result.decode('utf'))
 
        rval = []
 
        for device in result['blockdevices']:
 
            if removable and device['rm'] == '0':
 
            if removable and (device['rm'] == '0' or device['rm'] is False):
 
                continue
 
            if removable == 'False' and device['rm'] == '1':
 
            if removable == 'False' and (device['rm'] == '1' or device['rm'] is True):
 
                continue
 
            if device_type is not None and device['type'] != device_type:
 
                continue
 
            rval.append((
 
                device['name'],
 
                '{} {} {}'.format(device['vendor'].strip(), device['model'].strip(), device['size']),