From 80333b28720bd636603f819645ad17eefbdba354 Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Wed, 20 May 2020 20:30:20 +0300 Subject: [PATCH] Make ob-watcher independent of current working directory --- scripts/obwatch/ob-watcher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/obwatch/ob-watcher.py b/scripts/obwatch/ob-watcher.py index 1088a6e..83a8aab 100644 --- a/scripts/obwatch/ob-watcher.py +++ b/scripts/obwatch/ob-watcher.py @@ -271,7 +271,8 @@ class OrderbookPageRequestHeader(http.server.SimpleHTTPRequestHandler): pages = ['/', '/ordersize', '/depth', '/orderbook.json'] if self.path not in pages: return - fd = open('orderbook.html', 'r') + fd = open(os.path.join(os.path.dirname(os.path.realpath(__file__)), + 'orderbook.html'), 'r') orderbook_fmt = fd.read() fd.close() alert_msg = ''