From 6c3013d764960faa0314b48c41f97352d6ba0fb6 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Thu, 9 Jun 2011 22:35:44 +0000 Subject: [PATCH] Fix error when date and time are empty svn: r17736 --- src/plugins/gramplet/EditExifMetadata.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/gramplet/EditExifMetadata.py b/src/plugins/gramplet/EditExifMetadata.py index f11c696b2..3f16b0bc0 100644 --- a/src/plugins/gramplet/EditExifMetadata.py +++ b/src/plugins/gramplet/EditExifMetadata.py @@ -1691,6 +1691,9 @@ def _parse_datetime(value): Parse date and time and return a datetime object. """ value = value.rstrip() + if not value: + return None + if value.find(u':') >= 0: # Time part present if value.find(u' ') >= 0: