mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-22 04:25:55 -04:00
Simplify main
No need to handle this stuff here
This commit is contained in:
parent
78f994c0f1
commit
d91f3477a8
@ -1,15 +1,3 @@
|
|||||||
import sys
|
|
||||||
from toot.cli import cli
|
from toot.cli import cli
|
||||||
from toot.exceptions import ConsoleError
|
|
||||||
from toot.output import print_err
|
|
||||||
from toot.settings import load_settings
|
|
||||||
|
|
||||||
try:
|
cli()
|
||||||
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)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user