matrix bridge: Add main() function to enable installation.

This commit is contained in:
neiljp (Neil Pilgrim) 2018-05-30 22:48:37 -07:00 committed by Tim Abbott
parent dc83d9e468
commit 363720e908

View file

@ -154,7 +154,7 @@ def parse_args():
help="Suppress the IRC join/leave events.") help="Suppress the IRC join/leave events.")
return parser.parse_args() return parser.parse_args()
if __name__ == '__main__': def main() -> None:
signal.signal(signal.SIGINT, die) signal.signal(signal.SIGINT, die)
logging.basicConfig(level=logging.WARNING) logging.basicConfig(level=logging.WARNING)
@ -190,3 +190,6 @@ if __name__ == '__main__':
except Exception: except Exception:
traceback.print_exc() traceback.print_exc()
backoff.fail() backoff.fail()
if __name__ == '__main__':
main()