mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
generate redis config
This commit is contained in:
parent
53cee53844
commit
1cf00667e9
@ -56,8 +56,8 @@ def write_redis_config(template_name, context, bench_path):
|
|||||||
f.write(template.render(**context))
|
f.write(template.render(**context))
|
||||||
|
|
||||||
def get_redis_version():
|
def get_redis_version():
|
||||||
version_string = subprocess.check_output('redis-server --version', shell=True).strip()
|
version_string = subprocess.check_output('redis-server --version', shell=True)
|
||||||
|
version_string = version_string.decode('utf-8').strip()
|
||||||
# extract version number from string
|
# extract version number from string
|
||||||
version = re.findall("\d+\.\d+", version_string)
|
version = re.findall("\d+\.\d+", version_string)
|
||||||
if not version:
|
if not version:
|
||||||
|
Loading…
Reference in New Issue
Block a user