diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-02-05 09:30:07 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-02-05 09:30:56 -0400 |
commit | e099b49c60c0ac346df097ac2a4099ac47c893fe (patch) | |
tree | 1f0d47e9a2a54b1ec3caba0a6a1df70b61098cf8 | |
parent | 5775635951152c2e86fe8f1c1b584e2d49d5fe68 (diff) | |
download | cloud_mdir_sync-e099b49c60c0ac346df097ac2a4099ac47c893fe.tar.gz cloud_mdir_sync-e099b49c60c0ac346df097ac2a4099ac47c893fe.tar.bz2 cloud_mdir_sync-e099b49c60c0ac346df097ac2a4099ac47c893fe.zip |
Do not run tracing by default
trace is only for debugging adventures.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r-- | cloud_mdir_sync/config.py | 2 | ||||
-rw-r--r-- | cloud_mdir_sync/main.py | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/cloud_mdir_sync/config.py b/cloud_mdir_sync/config.py index bdec863..f0b5796 100644 --- a/cloud_mdir_sync/config.py +++ b/cloud_mdir_sync/config.py @@ -17,7 +17,7 @@ class Config(object): """Program configuration and general global state""" message_db_dir = "~/mail/.cms/" domains: Dict[str, Any] = {} - trace_file: Any + trace_file: Any = None web_app: "oauth.WebServer" logger: logging.Logger loop: asyncio.AbstractEventLoop diff --git a/cloud_mdir_sync/main.py b/cloud_mdir_sync/main.py index 54c9363..fdff700 100644 --- a/cloud_mdir_sync/main.py +++ b/cloud_mdir_sync/main.py @@ -125,12 +125,10 @@ def main(): cfg.load_config(args.CFG) cfg.loop = asyncio.get_event_loop() with contextlib.closing(pyinotify.WatchManager()) as wm, \ - contextlib.closing(messages.MessageDB(cfg)) as msgdb, \ - open("trace", "wb") as trace: + contextlib.closing(messages.MessageDB(cfg)) as msgdb: pyinotify.AsyncioNotifier(wm, cfg.loop) cfg.watch_manager = wm cfg.msgdb = msgdb - cfg.trace_file = trace cfg.loop.run_until_complete(synchronize_mail(cfg)) cfg.loop.run_until_complete(cfg.loop.shutdown_asyncgens()) |