bumblebee-status/bumblebee-status
Tobi-wan Kenobi 8855f1155b [core/errors] Add custom exceptions
Add custom exceptions and add error handling to the engine's module
loading logic. I.e. when a non-existent module is loaded, an exception
is thrown now.

see #23
2016-12-04 16:23:44 +01:00

25 lines
550 B
Python
Executable file

#!/usr/bin/env python
import sys
import bumblebee.engine
import bumblebee.config
import bumblebee.output
def main():
config = bumblebee.config.Config(sys.argv[1:])
output = bumblebee.output.I3BarOutput()
engine = bumblebee.engine.Engine(
config=config,
output=output,
)
engine.run()
if __name__ == "__main__":
try:
main()
except bumblebee.error.BaseError as error:
sys.stderr.write("fatal: {}\n".format(error))
sys.exit(1)
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4