From 6151e9cf6a0d3aa692e84221207223555a3e7e99 Mon Sep 17 00:00:00 2001 From: Thibaut Mattio Date: Wed, 8 Mar 2017 11:26:51 +0800 Subject: [PATCH] Fix crash when verified key does not exist --- libs/pascal_voc_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/pascal_voc_io.py b/libs/pascal_voc_io.py index 3197cb0a..64e62d77 100644 --- a/libs/pascal_voc_io.py +++ b/libs/pascal_voc_io.py @@ -145,7 +145,7 @@ class PascalVocReader: verified = xmltree.attrib['verified'] if verified == 'yes': self.verified = True - except AttributeError: + except KeyError: self.verified = False for object_iter in xmltree.findall('object'):