From bbe14fa88d79d93d427f55e94522b30b3f241efc Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Tue, 26 May 2015 21:31:45 -0400 Subject: [PATCH] slack: change directory before running To help find the tokens file, mostly Signed-off-by: Anna Schumaker --- slack/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/slack/__init__.py b/slack/__init__.py index 8fd4197..f8305f3 100644 --- a/slack/__init__.py +++ b/slack/__init__.py @@ -1,14 +1,17 @@ # # Copyright 2015 (c) Anna Schumaker # +import sys +import os + +path = os.path.realpath(sys.argv[0]) +os.chdir(os.path.dirname(path)) + from . import api from . import auth from . import channels -import sys - - # # Verify connection and setup team information.