From: Calin Crisan Date: Sun, 24 Jun 2018 13:39:33 +0000 (+0300) Subject: diskctl: fix 'unmatched' KeyError when listing disks X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=5c61470af6ab3fa85dc565ae610b5605535725c2;p=motioneye-debian diskctl: fix 'unmatched' KeyError when listing disks --- diff --git a/motioneye/diskctl.py b/motioneye/diskctl.py index 8d7a4b1..52c7a34 100644 --- a/motioneye/diskctl.py +++ b/motioneye/diskctl.py @@ -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():