Skip to content

Added Exception logging and update gitignore #41

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'master' into LOC_3656_log_exception_data
  • Loading branch information
edwinclement08 authored Sep 2, 2022
commit d471ba912fda7ed510402be9c695a6dc32574c99
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ MANIFEST
venv
build
browserstack_local.egg-info
build
browserstack_local.egg-info
10 changes: 9 additions & 1 deletion browserstack/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
from browserstack.bserrors import BrowserStackLocalError

logger = logging.getLogger(__name__)
try:
from importlib.metadata import version as package_version, PackageNotFoundError
except:
import pkg_resources

class Local:
def __init__(self, key=None, binary_path=None, **kwargs):
Expand Down Expand Up @@ -77,7 +81,11 @@ def start(self, **kwargs):
if "onlyCommand" in kwargs and kwargs["onlyCommand"]:
return

self.proc = subprocess.Popen('ls', stdout=subprocess.PIPE, stderr=subprocess.PIPE)

if 'source' in self.options:
del self.options['source']

self.proc = subprocess.Popen(self._generate_cmd(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(out, err) = self.proc.communicate()

os.system('echo "" > "'+ self.local_logfile_path +'"')
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.