From 2bc3abb7ee3e3c22caba8f47d2382ff38bcf3be9 Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Mon, 10 Apr 2023 12:26:19 +0200 Subject: [PATCH] fix argument error globally for action --- src/var/lib/tyto/program/args.py | 5 +++-- src/var/lib/tyto/program/status.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/var/lib/tyto/program/args.py b/src/var/lib/tyto/program/args.py index 39d0e77..aeed9b4 100644 --- a/src/var/lib/tyto/program/args.py +++ b/src/var/lib/tyto/program/args.py @@ -34,7 +34,7 @@ #********************************************************************** import os, sys -import infos, logs +import infos # Arguments from command line @@ -113,8 +113,9 @@ if noaction: sys.exit(0) # Unused argument [action] +act_err = False if not action in actions: - logs.out("11", action, True) + act_err = True # target diff --git a/src/var/lib/tyto/program/status.py b/src/var/lib/tyto/program/status.py index 631be67..2bd5324 100644 --- a/src/var/lib/tyto/program/status.py +++ b/src/var/lib/tyto/program/status.py @@ -38,6 +38,7 @@ import args, dom, logs, tyto, form def domain(): if dom.hole: logs.out("13", '', True) elif args.action == 'new': return + elif args.act_err: logs.out("11", args.action, True) elif not dom.exists: logs.out("10", '', True) elif dom.corrupt: logs.out("39", dom.shortname, True)