X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/06e460b91c23f11e92bf5ae711a4ed2226d3a0c7..040285e94b385dd57a003a4fe5b693c299fe921b:/src/catalogue/models/image.py diff --git a/src/catalogue/models/image.py b/src/catalogue/models/image.py index 34f61f94..8cadcec2 100755 --- a/src/catalogue/models/image.py +++ b/src/catalogue/models/image.py @@ -38,7 +38,7 @@ class Image(dvcs_models.Document): # Representing # ============ - def __unicode__(self): + def __str__(self): return self.title @models.permalink @@ -81,11 +81,11 @@ class Image(dvcs_models.Document): picture = WLPicture.from_bytes( picture_xml.encode('utf-8'), image_store=SelfImageStore) - except ParseError, e: + except ParseError as e: raise AssertionError(_('Invalid XML') + ': ' + str(e)) except NoDublinCore: raise AssertionError(_('No Dublin Core found.')) - except ValidationError, e: + except ValidationError as e: raise AssertionError(_('Invalid Dublin Core') + ': ' + str(e)) valid_about = self.correct_about() @@ -95,7 +95,7 @@ class Image(dvcs_models.Document): def publishable_error(self): try: return self.assert_publishable() - except AssertionError, e: + except AssertionError as e: return e else: return None