Merge branch 'master' of github.com:internetarchive/umbra into ari-3774

This commit is contained in:
Hunter Stern 2015-01-21 16:21:13 -08:00
commit e9451f88d8
7 changed files with 144 additions and 16 deletions

View file

@ -144,11 +144,12 @@ class Browser:
self._behavior = None
def send_to_chrome(self, **kwargs):
def send_to_chrome(self, suppress_logging=False, **kwargs):
msg_id = next(self.command_id)
kwargs['id'] = msg_id
msg = json.dumps(kwargs)
self.logger.debug('sending message to {}: {}'.format(self._websock, msg))
if not suppress_logging:
self.logger.debug('sending message to {}: {}'.format(self._websock, msg))
self._websock.send(msg)
return msg_id