Changeset - 03b0b1263122
[Not reviewed]
default
0 2 0
Silverwing - 3 years ago 2020-11-02 21:27:05

Fix working with newer lsblk
2 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
devices/__init__.py
Show inline comments
 
@@ -18,9 +18,9 @@ def get_storage_devices(removable=None, 
 
        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
forms/mainwindow.py
Show inline comments
 
@@ -71,10 +71,11 @@ class MainWindow(Ui_MainWindow, QtWidget
 
        os.makedirs(self.root, exist_ok=True)
 

	
 
        self.devices_model = CustomListModel()
 
        self.table_model = CustomTableModel('(Not set)')
 

	
 
        self.devices_combobox.setModel(self.devices_model)
 
        self.refresh_disk_drives()
 

	
 
        self.table_model = CustomTableModel('(Not set)')
 
        self.tableView.setModel(self.table_model)
 
        self.refresh_image_list()
 

	
0 comments (0 inline, 0 general)