From f4159758b2f5fda41726ab6fcbbfa79e0d9566f0 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Sat, 5 Mar 2011 00:32:51 +0000 Subject: [PATCH] Bug#4724; Fixed KeyError in Iptc of _get_value() -- similar to #4723 . svn: r16757 --- src/plugins/gramplet/MediaMetadata.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/gramplet/MediaMetadata.py b/src/plugins/gramplet/MediaMetadata.py index c487cb55b..ee35738dc 100644 --- a/src/plugins/gramplet/MediaMetadata.py +++ b/src/plugins/gramplet/MediaMetadata.py @@ -448,13 +448,15 @@ def _get_value(KeyTag, image): if "Exif" in KeyTag: try: KeyValue = image[KeyTag].raw_value + except KeyError: - KeyValue = image[KeyTag].value + KeyValue = "" # Iptc KeyValue family? else: try: - KeyValue = image[KeyTag].value + KeyValue = image[KeyTag] + except KeyError: KeyValue = ""