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

Unified Diff: client/third_party/infra_libs/httplib2_utils.py

Issue 2991803002: Update infra_libs to 1.1.15 / 0b44aba87c1c6538439df6d24a409870810747ab (Closed)
Patch Set: fix Created 3 years, 5 months 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
« no previous file with comments | « client/third_party/infra_libs/event_mon/router.py ('k') | client/third_party/infra_libs/ts_mon/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/third_party/infra_libs/httplib2_utils.py
diff --git a/client/third_party/infra_libs/httplib2_utils.py b/client/third_party/infra_libs/httplib2_utils.py
index bd94c534515d2c105411c279c292060c8897de0e..ce95f1303508436734415317f6e8e72e7d587147 100644
--- a/client/third_party/infra_libs/httplib2_utils.py
+++ b/client/third_party/infra_libs/httplib2_utils.py
@@ -5,6 +5,7 @@
import base64
import collections
import copy
+import httplib
import json
import logging
import os
@@ -338,8 +339,12 @@ class InstrumentedHttp(httplib2.Http):
except (socket.error, socket.herror, socket.gaierror):
self._update_metrics(http_metrics.STATUS_ERROR, start_time)
raise
- except httplib2.HttpLib2Error:
- self._update_metrics(http_metrics.STATUS_EXCEPTION, start_time)
+ except (httplib.HTTPException, httplib2.HttpLib2Error) as ex:
+ status = http_metrics.STATUS_EXCEPTION
+ if 'Deadline exceeded while waiting for HTTP response' in str(ex):
+ # Raised on Appengine (gae_override/httplib.py).
+ status = http_metrics.STATUS_TIMEOUT
+ self._update_metrics(status, start_time)
raise
http_metrics.response_bytes.add(len(content), fields=self.fields)
« no previous file with comments | « client/third_party/infra_libs/event_mon/router.py ('k') | client/third_party/infra_libs/ts_mon/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698