Bug 1296562 - Revert order for crash and socket checks in do_process_check decorator. r=maja_zf

MozReview-Commit-ID: Dd2Pl3FnbUP

--HG--
extra : rebase_source : 9e82925fab0ded5f33c2ada3f156ff6015986ef4
This commit is contained in:
Henrik Skupin 2016-08-19 09:22:32 +02:00
Родитель 37341a7ea4
Коммит 82410bbd03
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -43,13 +43,17 @@ def do_process_check(func, always=False):
except (MarionetteException, IOError) as e:
exc, val, tb = sys.exc_info()
# In case of no Marionette failures ensure to check for possible crashes.
# Do it before checking for port disconnects, to avoid reporting of unrelated
# crashes due to a forced shutdown of the application.
if not isinstance(e, MarionetteException) or type(e) is MarionetteException:
if not always:
check_for_crash()
# In case of socket failures force a shutdown of the application
if type(e) in (socket.error, socket.timeout):
m.force_shutdown()
if not isinstance(e, MarionetteException) or type(e) is MarionetteException:
if not always:
check_for_crash()
raise exc, val, tb
finally:
if always: