Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Unified Diff: appengine/third_party/python-adb/adb/adb_protocol.py

Issue 1424923006: Small fixes as found in staging. (Closed) Base URL: git@github.com:luci/luci-py.git@4_more_functionality
Patch Set: . Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/third_party/python-adb/adb/adb_protocol.py
diff --git a/appengine/third_party/python-adb/adb/adb_protocol.py b/appengine/third_party/python-adb/adb/adb_protocol.py
index 77ca22bb4ed57404bd5459b8dc3056f142753ed4..d89e28cfe580d09fb875432f171e7eb09089ab7e 100644
--- a/appengine/third_party/python-adb/adb/adb_protocol.py
+++ b/appengine/third_party/python-adb/adb/adb_protocol.py
@@ -314,7 +314,8 @@ class _AdbConnection(object):
def _OnRead(self, message):
"""Calls from within ReadAndDispatch(), so the manager lock is held."""
# Can be CLSE, OKAY or WRTE. It's generally basically an ACK.
- if message.header.arg0 != self.remote_id:
+ cmd_name = message.header.command_name
+ if message.header.arg0 != self.remote_id and cmd_name != 'CLSE':
# We can't assert that for now. TODO(maruel): Investigate the one-off
# cases.
logging.warning(
@@ -322,7 +323,6 @@ class _AdbConnection(object):
if message.header.arg1 != self._local_id:
raise InvalidResponseError(
'Unexpected local ID: expected %d' % self._local_id, message)
- cmd_name = message.header.command_name
if cmd_name == 'CLSE':
self._HasClosed()
return

Powered by Google App Engine
This is Rietveld 408576698