1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-06-23 06:25:26 +00:00
toot/toot/__main__.py
2023-11-28 10:13:05 +01:00

16 lines
371 B
Python

import sys
from toot.cli import cli
from toot.exceptions import ConsoleError
from toot.output import print_err
from toot.settings import load_settings
try:
defaults = load_settings().get("commands", {})
cli(default_map=defaults)
except ConsoleError as ex:
print_err(str(ex))
sys.exit(1)
except KeyboardInterrupt:
print_err("Aborted")
sys.exit(1)