Skip to content

Commit

Permalink
Merge pull request #74 from open-craft/artur/compile-translations-err…
Browse files Browse the repository at this point in the history
…or-handling

fix: handle exceptions without a message attribute on compile translations e.g. FileNotFoundError
  • Loading branch information
iamsobanjaved authored Feb 23, 2024
2 parents c05fd61 + 7b17794 commit 27e2259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def compile_translations(self):
self.announce('Compiling translation at %s' % po_path)
subprocess.check_call(['msgfmt', po_path, '-o', mo_path], cwd=self.install_lib)
except Exception as ex:
self.announce('Translations compilation failed: %s' % ex.message)
self.announce('Translations compilation failed: %s' % getattr(ex, 'message', str(ex)))


def package_data(pkg, root_list):
Expand Down

0 comments on commit 27e2259

Please sign in to comment.