mirror of https://github.com/zulip/zulip.git
Apply Python 3 futurize transform lib2to3.fixes.fix_numliterals.
This commit is contained in:
parent
2398a370e2
commit
daddf7c519
|
@ -45,7 +45,7 @@ def get_or_create_key_prefix():
|
|||
|
||||
filename = os.path.join(settings.DEPLOY_ROOT, "memcached_prefix")
|
||||
try:
|
||||
fd = os.open(filename, os.O_CREAT | os.O_EXCL | os.O_RDWR, 0444)
|
||||
fd = os.open(filename, os.O_CREAT | os.O_EXCL | os.O_RDWR, 0o444)
|
||||
prefix = base64.b16encode(hashlib.sha256(str(random.getrandbits(256))).digest())[:32].lower() + ':'
|
||||
# This does close the underlying file
|
||||
with os.fdopen(fd, 'w') as f:
|
||||
|
|
Loading…
Reference in New Issue