Show More
@@ -38,10 +38,10 b' import string' | |||||
38 | import sys |
|
38 | import sys | |
39 | import time |
|
39 | import time | |
40 | import urllib.parse |
|
40 | import urllib.parse | |
41 | from distutils.version import StrictVersion |
|
|||
42 |
|
41 | |||
43 | import bcrypt |
|
42 | import bcrypt | |
44 | import urlobject |
|
43 | import urlobject | |
|
44 | from packaging.version import Version | |||
45 | from sqlalchemy.engine import url as sa_url |
|
45 | from sqlalchemy.engine import url as sa_url | |
46 | from sqlalchemy.exc import ArgumentError |
|
46 | from sqlalchemy.exc import ArgumentError | |
47 | from tg import tmpl_context |
|
47 | from tg import tmpl_context | |
@@ -494,7 +494,7 b' def check_password(password, hashed):' | |||||
494 | return False |
|
494 | return False | |
495 |
|
495 | |||
496 |
|
496 | |||
497 |
git_req_ver = |
|
497 | git_req_ver = Version('1.7.4') | |
498 |
|
498 | |||
499 | def check_git_version(): |
|
499 | def check_git_version(): | |
500 | """ |
|
500 | """ | |
@@ -525,7 +525,7 b' def check_git_version():' | |||||
525 | output = safe_str(stdout).strip() |
|
525 | output = safe_str(stdout).strip() | |
526 | m = re.search(r"\d+.\d+.\d+", output) |
|
526 | m = re.search(r"\d+.\d+.\d+", output) | |
527 | if m: |
|
527 | if m: | |
528 |
ver = |
|
528 | ver = Version(m.group(0)) | |
529 | log.debug('Git executable: "%s", version %s (parsed from: "%s")', |
|
529 | log.debug('Git executable: "%s", version %s (parsed from: "%s")', | |
530 | settings.GIT_EXECUTABLE_PATH, ver, output) |
|
530 | settings.GIT_EXECUTABLE_PATH, ver, output) | |
531 | if ver < git_req_ver: |
|
531 | if ver < git_req_ver: | |
@@ -538,7 +538,7 b' def check_git_version():' | |||||
538 | log.error("Terminating ...") |
|
538 | log.error("Terminating ...") | |
539 | sys.exit(1) |
|
539 | sys.exit(1) | |
540 | else: |
|
540 | else: | |
541 |
ver = |
|
541 | ver = Version('0.0.0') | |
542 | log.warning('Error finding version number in "%s --version" stdout:\n%s', |
|
542 | log.warning('Error finding version number in "%s --version" stdout:\n%s', | |
543 | settings.GIT_EXECUTABLE_PATH, output) |
|
543 | settings.GIT_EXECUTABLE_PATH, output) | |
544 |
|
544 |
General Comments 0
You need to be logged in to leave comments.
Login now