summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/core/management/commands/makemessages.py4
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?")