Closed
Bug 863377
Opened 11 years ago
Closed 11 years ago
Can no longer catch socket.error in marionette client
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(firefox21 wontfix, firefox22 wontfix, firefox23 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix)
RESOLVED
FIXED
mozilla23
People
(Reporter: kumar, Assigned: ahal)
Details
Attachments
(1 file)
1.49 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
As of the Python marionette_client version 0.9 I can no longer catch socket.error and this makes programmatic access difficult. This is the culprit around line 400 of marionette.py: def start_session(self, desired_capabilities=None): try: # We are ignoring desired_capabilities, at least for now. self.session = self._send_message('newSession', 'value') except: traceback.print_exc() self.check_for_crash() sys.exit() Why not catch and re-raise like this? def start_session(self, desired_capabilities=None): try: # We are ignoring desired_capabilities, at least for now. self.session = self._send_message('newSession', 'value') except: exc, val, tb = sys.exc_info() self.check_for_crash() raise exc, val, tb My script was catching a socket.error and reacting by forwarding ports: https://github.com/kumar303/ezboot/blob/70fb41fe53ee17d377424065706909651e037d60/ezboot/__init__.py#L120-L124
Reporter | ||
Comment 1•11 years ago
|
||
the workaround is to catch SystemExit which is fragile
Updated•11 years ago
|
Assignee: nobody → ahalberstadt
Assignee | ||
Comment 2•11 years ago
|
||
Good catch, I forgot you could raise like that. Kumar, do you need this on b2g18 too?
Attachment #739639 -
Flags: review?(jgriffin)
Comment 3•11 years ago
|
||
Comment on attachment 739639 [details] [diff] [review] Patch 1.0 - fix Review of attachment 739639 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #739639 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 4•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb2202cf3489
Status: NEW → ASSIGNED
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/eb2202cf3489
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Reporter | ||
Comment 6•11 years ago
|
||
Thanks Andrew. I don't think it matters if this lands on b2g18 or not. Just let me know when a new version of the lib is available on PyPI and when gaiatest has been updated to depend on it.
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Kumar McMillan [:kumar] from comment #6) > Thanks Andrew. I don't think it matters if this lands on b2g18 or not. Just > let me know when a new version of the lib is available on PyPI and when > gaiatest has been updated to depend on it. If this is blocking something we can bump the version specifically for this. Otherwise we'll just wait until there's a need to.
Reporter | ||
Comment 8•11 years ago
|
||
It's not blocking, we can work around by catching SystemExit
Comment 9•11 years ago
|
||
A new version of marionette has just been released on pypi (version 0.5.25), but can this be uplifted to b2g18? Best to keep things in sync so we don't go hunting for bugs when the next conflict happens!
Updated•11 years ago
|
Keywords: checkin-needed
Comment 10•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/14b6336f254d
status-b2g18:
--- → fixed
status-b2g18-v1.0.0:
--- → wontfix
status-b2g18-v1.0.1:
--- → wontfix
status-firefox21:
--- → wontfix
status-firefox22:
--- → wontfix
status-firefox23:
--- → fixed
Keywords: checkin-needed
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•