From 0381c4f7a9c8caaeb3d4669090abe057e113819f Mon Sep 17 00:00:00 2001 From: Vibhaj Rajan Date: Fri, 1 Jul 2016 16:41:39 +0530 Subject: [PATCH 1/2] fixed issue when key not in env --- browserstack/local.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/browserstack/local.py b/browserstack/local.py index abd2312..365e962 100644 --- a/browserstack/local.py +++ b/browserstack/local.py @@ -3,8 +3,8 @@ from browserstack.bserrors import BrowserStackLocalError class Local: - def __init__(self, key=os.environ['BROWSERSTACK_ACCESS_KEY'], binary_path=None): - self.key = key + def __init__(self, key=None, binary_path=None): + self.key = os.environ['BROWSERSTACK_ACCESS_KEY'] if 'BROWSERSTACK_ACCESS_KEY' in os.environ else None self.options = None self.local_logfile_path = os.path.join(os.getcwd(), 'local.log') diff --git a/setup.py b/setup.py index 2049746..06cf748 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name = 'browserstack-local', packages = ['browserstack'], - version = '1.0.0', + version = '1.1.0', description = 'Python bindings for Browserstack Local', author = 'BrowserStack', author_email = 'support@browserstack.com', From cfd4780a34f91d58ed473fca08124f395a4adb36 Mon Sep 17 00:00:00 2001 From: Vibhaj Rajan Date: Fri, 1 Jul 2016 16:43:57 +0530 Subject: [PATCH 2/2] key fix --- browserstack/local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browserstack/local.py b/browserstack/local.py index 365e962..07d92c4 100644 --- a/browserstack/local.py +++ b/browserstack/local.py @@ -4,7 +4,7 @@ class Local: def __init__(self, key=None, binary_path=None): - self.key = os.environ['BROWSERSTACK_ACCESS_KEY'] if 'BROWSERSTACK_ACCESS_KEY' in os.environ else None + self.key = os.environ['BROWSERSTACK_ACCESS_KEY'] if 'BROWSERSTACK_ACCESS_KEY' in os.environ else key self.options = None self.local_logfile_path = os.path.join(os.getcwd(), 'local.log')