Skip to content

Commit

Permalink
Fixed AttributeError bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SyZn authored and strichter committed May 23, 2017
1 parent d72aa83 commit be3ab1e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/zope/i18n/compile.py
Expand Up @@ -43,5 +43,7 @@ def compile_mo_file(domain, lc_messages_path):
fd = open(mofile, 'wb')
fd.write(mo.read())
fd.close()
except (IOError, OSError, PoSyntaxError) as err:
logger.warn('Error while compiling %s (%s).' % (pofile, err.msg))
except PoSyntaxError as err:
logger.warn('Syntax error while compiling %s (%s).' % (pofile, err.msg))
except (IOError, OSError):
logger.warn('Error while compiling %s.' % pofile)

0 comments on commit be3ab1e

Please sign in to comment.