Skip to content

Commit

Permalink
fix: handle exceptions without a message attribute on compile transla…
Browse files Browse the repository at this point in the history
…tions

E.g. FileNotFoundError.
  • Loading branch information
ArturGaspar committed Feb 21, 2024
1 parent c05fd61 commit 7b17794
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 7b17794

Please sign in to comment.