mirror of
https://github.com/django/django.git
synced 2025-09-28 04:54:53 +00:00
Fixed gettext version regex
...with the theoretical assumption that gettext may once reach a two-digit number. Thanks Walter Doekes for noticing this potential issue.
This commit is contained in:
parent
e0080cf577
commit
9f328405f6
1 changed files with 1 additions and 1 deletions
|
@ -324,7 +324,7 @@ class Command(BaseCommand):
|
||||||
@cached_property
|
@cached_property
|
||||||
def gettext_version(self):
|
def gettext_version(self):
|
||||||
out, err, status = gettext_popen_wrapper(['xgettext', '--version'])
|
out, err, status = gettext_popen_wrapper(['xgettext', '--version'])
|
||||||
m = re.search(r'(\d)\.(\d+)\.?(\d+)?', out)
|
m = re.search(r'(\d+)\.(\d+)\.?(\d+)?', out)
|
||||||
if m:
|
if m:
|
||||||
return tuple(int(d) for d in m.groups() if d is not None)
|
return tuple(int(d) for d in m.groups() if d is not None)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue