Make compile_catalog actually fail on error, to catch it in CI (#2979)

This commit is contained in:
Oleh Prypin
2022-09-17 18:40:18 +02:00
committed by GitHub
parent 8315ece4f6
commit 730da08158

View File

@@ -1,5 +1,6 @@
from __future__ import annotations
import sys
from distutils.errors import DistutilsOptionError
from os import path
@@ -31,6 +32,12 @@ class compile_catalog(babel.compile_catalog, ThemeMixin):
("theme=", "t", "theme name to work on"),
]
def run(self):
# Possible bug in Babel - produces unused return value:
# https://github.com/python-babel/babel/blob/v2.10.3/babel/messages/frontend.py#L194
if super().run():
sys.exit(1)
def initialize_options(self):
super().initialize_options()
self.theme = None