Correct whitespaces and add context manager for file locking

This commit is contained in:
R. Richard
2019-07-31 16:59:08 +02:00
committed by therealkrispet
parent 25bd9aa0f3
commit 96c6c9b358
3 changed files with 18 additions and 11 deletions

View File

@ -7,7 +7,6 @@ from stat import S_IRUSR, S_IWUSR, S_IXUSR
from tfw.internals.lazy import lazy_property
from tfw.internals.ref_counter import RefCounter
KEYFILE = join(gettempdir(), 'tfw-auth.key')
LOCKFILE = join(gettempdir(), 'tfw-auth.lock')
@ -45,4 +44,5 @@ class KeyManager:
def _chmod_700_keyfile(self):
chmod(self.keyfile, S_IRUSR | S_IWUSR | S_IXUSR)
register(KeyManager.refcounter.teardown_instance)