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

Unified Diff: Tools/TestResultServer/model/jsonresults.py

Issue 475503005: Handle tries of results data in upload (fix _is_directory). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add a test, fix unrelated failing unittest Created 6 years, 4 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
Index: Tools/TestResultServer/model/jsonresults.py
diff --git a/Tools/TestResultServer/model/jsonresults.py b/Tools/TestResultServer/model/jsonresults.py
index 10be3fbc9665185a98d100e3f79c34d2e2e12546..8a9cd40024816a680089521f50e4acabc8b84324 100755
--- a/Tools/TestResultServer/model/jsonresults.py
+++ b/Tools/TestResultServer/model/jsonresults.py
@@ -26,6 +26,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import collections
import json
import logging
import re
@@ -110,7 +111,7 @@ FAILURE_TO_CHAR = {
CHAR_TO_FAILURE = dict((value, key) for key, value in FAILURE_TO_CHAR.items())
def _is_directory(subtree):
- return RESULTS_KEY not in subtree
+ return RESULTS_KEY not in subtree or not isinstance(subtree[RESULTS_KEY], collections.Sequence)
class JsonResults(object):

Powered by Google App Engine
This is Rietveld 408576698