From 589d4563baa8c6b5bfbcab884d9d56e8e37e981a Mon Sep 17 00:00:00 2001 From: Edward Lemur Date: Thu, 21 Nov 2019 00:55:15 +0000 Subject: [PATCH] depot_tools: Run watchlists tests on Python 3 Bug: 1002209 Change-Id: I64aecc5e06be13237b73ae568a1beae046ba4962 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1925324 Reviewed-by: Anthony Polito Commit-Queue: Edward Lesmes --- tests/watchlists_unittest.py | 2 +- watchlists.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/watchlists_unittest.py b/tests/watchlists_unittest.py index d18a86983..7af9151f9 100755 --- a/tests/watchlists_unittest.py +++ b/tests/watchlists_unittest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env vpython3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/watchlists.py b/watchlists.py index f8b31c696..ee26f1029 100755 --- a/watchlists.py +++ b/watchlists.py @@ -121,8 +121,9 @@ class Watchlists(object): if name not in self._watchlists: continue if rule.search(path): - map(watchers.add, self._watchlists[name]) - return list(watchers) + for watchlist in self._watchlists[name]: + watchers.add(watchlist) + return sorted(watchers) def main(argv):