diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-12-18 14:38:46 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-12-18 16:06:33 +0100 |
| commit | 9bcd4d812ca698fd3a2de8c52cae8e63c261e628 (patch) | |
| tree | dad9b6fc0086158b7d74922d5ec683c0be0533de /django | |
| parent | 4a2a433e7daca1e1797b7b34d30d49ad4e09791c (diff) | |
Fixed #23788 (2) -- Improved gettext version checker
Thanks Tim Graham for the report and initial patch.
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/management/commands/makemessages.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py index ba8de527bf..932bc0897e 100644 --- a/django/core/management/commands/makemessages.py +++ b/django/core/management/commands/makemessages.py @@ -310,9 +310,9 @@ class Command(BaseCommand): @cached_property def gettext_version(self): out, err, status = popen_wrapper(['xgettext', '--version']) - m = re.search(r'(\d)\.(\d+)\.(\d+)', out) + m = re.search(r'(\d)\.(\d+)\.?(\d+)?', out) if m: - return tuple(int(d) for d in m.groups()) + return tuple(int(d) for d in m.groups() if d is not None) else: raise CommandError("Unable to get gettext version. Is it installed?") |
