diff --git a/AUTHORS b/AUTHORS index 6721509..6b9d854 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,6 +6,7 @@ alphabetical order): - Alexandre Chataignon (@xouillet) - Alexey Bazhin - Andreas Sieferlinger +- Andriy Dzedolik (@IrvinDitz) - Antoine Beaupré - Antoine Pitrou - Brent Bandelgar (@brentbb) diff --git a/sigal/gallery.py b/sigal/gallery.py index fffa37a..35d74aa 100644 --- a/sigal/gallery.py +++ b/sigal/gallery.py @@ -175,11 +175,16 @@ class Image(Media): # Nothing to do - we already have title and description return - iptc_data = get_iptc_data(self.src_path) - if not self.title and iptc_data.get('title'): - self.title = iptc_data['title'] - if not self.description and iptc_data.get('description'): - self.description = iptc_data['description'] + try: + iptc_data = get_iptc_data(self.src_path) + except Exception as e: + self.logger.warning(u'Could not read IPTC data from %s: %s', + self.src_path, e) + else: + if not self.title and iptc_data.get('title'): + self.title = iptc_data['title'] + if not self.description and iptc_data.get('description'): + self.description = iptc_data['description'] @cached_property def raw_exif(self):