From 04d95c2d08d5b583ecd2a7d063da2d42860aa720 Mon Sep 17 00:00:00 2001 From: Darksider3 Date: Sun, 13 Oct 2019 22:20:59 +0200 Subject: [PATCH] realign layout --- private/ListUsers.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/private/ListUsers.py b/private/ListUsers.py index 428d54a..05f21a6 100644 --- a/private/ListUsers.py +++ b/private/ListUsers.py @@ -10,16 +10,16 @@ class ListUsers: def __init__(self, uap: bool = CFG.args.unapproved, app: bool = CFG.args.approved): self.db = SQLitedb(CFG.REG_FILE) - if uap: # only unapproved users + if uap: # only unapproved users query = "SELECT * FROM `applications` WHERE status = '0'" - elif app: # Approved users + elif app: # Approved users query = "SELECT * FROM `applications` WHERE status = '1'" - else: # All users + else: # All users query = "SELECT * FROM `applications`" self.usersFetch = self.db.query(query) def prettyPrint(self) -> None: - pass # see below why not implemented yet, texttable... + pass # see below why not implemented yet, texttable... def getFetch(self) -> list: """ Returns a complete fetch done by the sqlitedb-class @@ -56,12 +56,12 @@ print(t.draw()) print("ID: {}; Username: \"{}\"; Mail: {}; Name: \"{}\"; Registered: {}; Status: {}".format( user["id"], user["username"], user["email"], user["name"], user["timestamp"], user["status"] ))""" - ret += "ID %-1s| Username %-5s| Mail %-20s| Name %-17s| Registered %-8s| State |\n" % ( + ret += "ID %-1s| Username %-5s| Mail %-20s| Name %-17s| Registered %-8s | State |\n" % ( " ", " ", " ", " ", " " ) - ret += 101*"-" + "\n" + ret += 102 * "-" + "\n" for user in fetch: - ret += "%-4i| %-14s| %-25s| %-22s| %-8s| %-6i|\n" % ( + ret += "%-4i| %-14s| %-25s| %-22s| %-8s | %-5i |\n" % ( user["id"], user["username"], user["email"], user["name"], user["timestamp"], user["status"] ) if CFG.args.file != "stdout":