cache: Fix echoing of mkdir command to console.

This commit is contained in:
Tim Abbott
2016-07-18 14:25:01 -07:00
parent 4c805b8757
commit 014a13df7c

View File

@@ -12,7 +12,7 @@ from django.core.cache.backends.base import BaseCache
from typing import Any, Callable, Iterable, Optional, Union, TypeVar from typing import Any, Callable, Iterable, Optional, Union, TypeVar
from zerver.lib.utils import statsd, statsd_key, make_safe_digest from zerver.lib.utils import statsd, statsd_key, make_safe_digest
from zulip_tools import run import subprocess
import time import time
import base64 import base64
import random import random
@@ -60,7 +60,7 @@ def get_or_create_key_prefix():
# The Python tests overwrite KEY_PREFIX on each test. # The Python tests overwrite KEY_PREFIX on each test.
return u'test_suite:%s:' % (text_type(os.getpid()),) return u'test_suite:%s:' % (text_type(os.getpid()),)
# directory `var` should exist in production # directory `var` should exist in production
run(["mkdir", "-p", os.path.join(settings.DEPLOY_ROOT, "var")]) subprocess.check_call(["mkdir", "-p", os.path.join(settings.DEPLOY_ROOT, "var")])
filename = os.path.join(settings.DEPLOY_ROOT, "var", "remote_cache_prefix") filename = os.path.join(settings.DEPLOY_ROOT, "var", "remote_cache_prefix")
try: try: