fix argv compat bug

This commit is contained in:
ed 2021-07-26 19:40:12 +02:00
parent f3dc6a217b
commit 806e7b5530
2 changed files with 5 additions and 5 deletions

View file

@ -388,15 +388,15 @@ def main(argv=None):
oa = ostr.split(":")
na = oa[:2]
for opt in oa[2:]:
if opt and (opt[0] == "a" or (len(opt) > 1 and "," not in opt)):
if re.match("c[^,]", opt):
mod = True
na.append("c," + opt[2:])
elif re.sub("^[rwmd]*", "", opt) and "," not in opt:
mod = True
perm = opt[0]
if perm == "a":
perm = "rw"
na.append(perm + "," + opt[1:])
elif opt and opt.startswith("c") and not opt.startswith("c,"):
mod = True
na.append("c," + opt[2:])
else:
na.append(opt)

View file

@ -55,7 +55,7 @@ class SvcHub(object):
start_log_thrs(self.log, args.log_thrs, 0)
# initiate all services to manage
self.asrv = AuthSrv(self.args, self.log, False)
self.asrv = AuthSrv(self.args, self.log)
if args.ls:
self.asrv.dbg_ls()