introducing the -u flag, which turns on the 'unapproved' mode.
Oh, and just testing it in ListUsers.py :)
This commit is contained in:
parent
2eeeebdacb
commit
3915843943
2 changed files with 8 additions and 1 deletions
|
@ -6,6 +6,10 @@ import lib.CFG as CFG
|
|||
if __name__ == "__main__":
|
||||
try:
|
||||
SQLitedb(CFG.REG_FILE)
|
||||
if CFG.args.unapproved:
|
||||
print("yes! Only unapproved ones!")
|
||||
else:
|
||||
print("Just approved ones")
|
||||
print("hi")
|
||||
exit(0)
|
||||
except KeyboardInterrupt:
|
||||
|
|
|
@ -7,9 +7,12 @@ else:
|
|||
if os.path.isfile(cwd) is False:
|
||||
cwd = os.getcwd() + "/applicationsconfig.ini"
|
||||
# cwd is now either cwd/applicationsconfig or $TILDE_CONF
|
||||
argparser = argparse.ArgumentParser(description='interactive registration formular for tilde platforms')
|
||||
argparser = argparse.ArgumentParser(description='Tilde administration tools')
|
||||
argparser.add_argument('-c', '--config', default=cwd,
|
||||
type=str, help='Path to configuration file', required=False)
|
||||
# store_true just stores true when the command is supplied, so it doesn't need choices nor types
|
||||
argparser.add_argument('-u', '--unapproved', default=False, action="store_true",
|
||||
help='List only unapproved users', required=False)
|
||||
args = argparser.parse_args()
|
||||
|
||||
CONF_FILE = args.config
|
||||
|
|
Loading…
Reference in a new issue