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

Unified Diff: tools/telemetry/telemetry/core/platform/linux_platform_backend.py

Issue 381293003: [Telemetry] Consider linux distribution number is 0 when it cannot be parsed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/linux_platform_backend.py
diff --git a/tools/telemetry/telemetry/core/platform/linux_platform_backend.py b/tools/telemetry/telemetry/core/platform/linux_platform_backend.py
index 71c68bbfbe859528adee4187a26dd6c39c1932e9..97ea60125fb2b10842fbe98050729bd09ac41fe4 100644
--- a/tools/telemetry/telemetry/core/platform/linux_platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/linux_platform_backend.py
@@ -51,6 +51,10 @@ class LinuxPlatformBackend(
codename = value.strip()
elif key == 'DISTRIB_RELEASE':
version = float(value)
tonyg 2014/07/11 02:33:45 I think you meant to remove this line. That kind
+ try:
+ version = float(value)
+ except ValueError:
+ version = 0
if codename and version:
break
return platform_backend.OSVersion(codename, version)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698