roomservice.py: Use list type for filter() results
A filter() call returns an iterable in python3.
If len(matches) is then checked, you get a nasty error:
[...]
WARNING: Trying to fetch a device that's already there
[...]
File "vendor/omni/build/tools/roomservice.py", line 56, in check_repo_exists
if len(matches) != 1:
TypeError: object of type 'filter' has no len()
Change-Id: I48b42e6931bdbc1bfef2203ede0b3dadc8582a56
diff --git a/build/tools/roomservice.py b/build/tools/roomservice.py
index cad299e..8f3641f 100755
--- a/build/tools/roomservice.py
+++ b/build/tools/roomservice.py
@@ -52,7 +52,7 @@
def check_repo_exists(git_data, device):
re_match = "^android_device_.*_{device}$".format(device=device)
- matches = filter(lambda x: re.match(re_match, x), git_data)
+ matches = list(filter(lambda x: re.match(re_match, x), git_data))
if len(matches) != 1:
raise Exception("{device} not found,"
"exiting roomservice".format(device=device))