diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-07-17 22:04:47 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-07-17 22:04:47 +0200 |
| commit | 8184aff2b0a3fbe6759163c0289f640a393a3e99 (patch) | |
| tree | 4ae618a3c1186d946690321701c028de77d73ce7 | |
| parent | 23f94f0741100233862922a8e77a3ac9dc1833e9 (diff) | |
Fixed #18547 -- Improved error message when gettext is missing
| -rw-r--r-- | django/core/management/commands/makemessages.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py index 046ffb48f2..cc6d3a7e48 100644 --- a/django/core/management/commands/makemessages.py +++ b/django/core/management/commands/makemessages.py @@ -291,7 +291,10 @@ def make_messages(locale=None, domain='django', verbosity=1, all=False, raise CommandError(message) # We require gettext version 0.15 or newer. - output = _popen('xgettext --version')[0] + output, errors = _popen('xgettext --version') + if errors: + raise CommandError("Error running xgettext. Note that Django " + "internationalization requires GNU gettext 0.15 or newer.") match = re.search(r'(?P<major>\d+)\.(?P<minor>\d+)', output) if match: xversion = (int(match.group('major')), int(match.group('minor'))) |
