Verbose option.

This commit is contained in:
Sleepy Monax 2023-02-06 18:07:52 +01:00
parent 5f313dc682
commit db9b3f25f9

View file

@ -1,6 +1,6 @@
import sys
from osdk import const
from osdk.args import parse
from osdk.cmds import exec, usage
from osdk.plugins import loadAll
@ -8,9 +8,13 @@ import osdk.vt100 as vt100
def main() -> int:
a = parse(sys.argv[1:])
if not a.consumeOpt("verbose", False):
sys.stderr = open(f"{const.OSDK_DIR}/osdk.log", "w")
try:
loadAll()
a = parse(sys.argv[1:])
exec(a)
return 0
except Exception as e: