Skip to content

Add support for multi-word args like --force-local. Version bump. #33

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions browserstack/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ def __init__(self, key=None, binary_path=None, **kwargs):
def __xstr(self, key, value):
if key is None:
return ['']
if len(key) > 1:
key = key.replace("_", "-")
key = "--" + key
else:
key = "-" + key
if str(value).lower() == "true":
return ['-' + key]
return [key]
else:
return ['-' + key, value]
return [key, value]

def _generate_cmd(self):
cmd = [self.binary_path, '-d', 'start', '-logFile', self.local_logfile_path, self.key]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
setup(
name = 'browserstack-local',
packages = ['browserstack'],
version = '1.2.2',
version = '1.2.4',
description = 'Python bindings for Browserstack Local',
author = 'BrowserStack',
author_email = 'support@browserstack.com',
Expand Down