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 Dec 18, 2023
1 parent d32e7e4 commit 12ffdaa
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 12ffdaa

Please sign in to comment.