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

Unified Diff: tools/telemetry/telemetry/core/chrome/cros_browser_finder.py

Issue 16290009: /etc/lsb-release doesn't exist on some non-Ubuntu variants of linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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/chrome/cros_browser_finder.py
===================================================================
--- tools/telemetry/telemetry/core/chrome/cros_browser_finder.py (revision 202623)
+++ tools/telemetry/telemetry/core/chrome/cros_browser_finder.py (working copy)
@@ -5,6 +5,7 @@
import logging
import sys
+import os
from telemetry.core import browser
from telemetry.core import possible_browser
@@ -45,8 +46,9 @@
def FindAllAvailableBrowsers(options):
"""Finds all available chromeos browsers, locally and remotely."""
# Check if we are on a chromeos device.
- if sys.platform.startswith('linux'):
- with open('/etc/lsb-release', 'r') as f:
+ lsb_release = '/etc/lsb-release'
+ if sys.platform.startswith('linux') and os.path.exists(lsb_release):
+ with open(lsb_release, 'r') as f:
res = f.read()
if res.count('CHROMEOS_RELEASE_NAME'):
return [PossibleCrOSBrowser('system', options,
« 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