]> www.vanbest.org Git - motioneye-debian/commitdiff
diskctl: fix 'unmatched' KeyError when listing disks
authorCalin Crisan <ccrisan@gmail.com>
Sun, 24 Jun 2018 13:39:33 +0000 (16:39 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 24 Jun 2018 13:39:33 +0000 (16:39 +0300)
motioneye/diskctl.py

index 8d7a4b18216ebd8a797a44d2d87866898e18572e..52c7a34f6e71c8e4e6f649fbf3f220a9c3e50f5d 100644 (file)
@@ -131,7 +131,7 @@ def _list_disks_dev_by_id():
         for disk_dev, disk in disks_by_dev.items():
             if dev.startswith(disk_dev):
                 disk['partitions'].append(partition)
-                partition.pop('unmatched')
+                partition.pop('unmatched', None)
             
     # add separate partitions that did not match any disk
     for partition in partitions_by_dev.values():