support ~ paths

This commit is contained in:
ed 2021-04-11 17:36:38 +02:00
parent a2657887cc
commit 1034a51bd2
2 changed files with 2 additions and 7 deletions

1
.vscode/launch.py vendored
View file

@ -16,6 +16,7 @@ with open(".vscode/launch.json", "r") as f:
oj = jstyleson.loads(tj)
argv = oj["configurations"][0]["args"]
argv = [os.path.expanduser(x) if x.startswith("~") else x for x in argv]
try:
copyparty(argv)
except SystemExit as ex:

View file

@ -233,12 +233,6 @@ class AuthSrv(object):
def log(self, msg, c=0):
self.log_func("auth", msg, c)
def invert(self, orig):
if PY2:
return {v: k for k, v in orig.iteritems()}
else:
return {v: k for k, v in orig.items()}
def laggy_iter(self, iterable):
"""returns [value,isFinalValue]"""
it = iter(iterable)
@ -495,7 +489,7 @@ class AuthSrv(object):
with self.mutex:
self.vfs = vfs
self.user = user
self.iuser = self.invert(user)
self.iuser = {v: k for k, v in user.items()}
# import pprint
# pprint.pprint({"usr": user, "rd": mread, "wr": mwrite, "mnt": mount})