Chromium Code Reviews| Index: tools/telemetry/telemetry/core/platform/desktop_platform_backend.py |
| diff --git a/tools/telemetry/telemetry/core/platform/desktop_platform_backend.py b/tools/telemetry/telemetry/core/platform/desktop_platform_backend.py |
| index 70f0626d9f8fe9c7dcaa36f722a133b8278ac51b..b71deab49c9c46fb5af0f0af22b62581e4917fcd 100644 |
| --- a/tools/telemetry/telemetry/core/platform/desktop_platform_backend.py |
| +++ b/tools/telemetry/telemetry/core/platform/desktop_platform_backend.py |
| @@ -22,7 +22,7 @@ class DesktopPlatformBackend(platform_backend.PlatformBackend): |
| flush_command_mtime = 0 |
| chrome_root = util.GetChromiumSrcDir() |
| - for build_type, build_dir in util.BuildDirectoryIterator(): |
| + for build_dir, build_type in util.GetBuildDirectories(): |
| candidate = os.path.join(chrome_root, build_dir, build_type, |
| self.GetFlushUtilityName()) |
| if os.access(candidate, os.X_OK): |
| @@ -43,9 +43,12 @@ class DesktopPlatformBackend(platform_backend.PlatformBackend): |
| args = [flush_command, '--recurse'] |
| directory_contents = os.listdir(directory) |
| for item in directory_contents: |
| - if item not in ignoring: |
| + if not ignoring or item not in ignoring: |
| args.append(os.path.join(directory, item)) |
| + if len(args) < 3: |
| + return |
|
tonyg
2013/08/08 01:16:35
Should this be an assert?
James Simonsen
2013/08/08 02:06:07
No. In the case of an empty profile, there's nothi
|
| + |
| p = subprocess.Popen(args) |
| p.wait() |
| assert p.returncode == 0, 'Failed to flush system cache' |