[PATCH] osmo-gsm-tester[master]: resource: Fix list comparison in item_matches

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Aug 28 12:34:02 UTC 2017


Review at  https://gerrit.osmocom.org/3721

resource: Fix list comparison in item_matches

Change-Id: I27b372aa5906feac2843f24f5cdd0d9578d44b4d
---
M src/osmo_gsm_tester/resource.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/21/3721/1

diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index c55140a..da543f7 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -441,9 +441,12 @@
         return True
 
     if is_list(wanted_item):
-        # multiple possible values
-        if item not in wanted_item:
+        if not is_list(item):
             return False
+        # multiple possible values
+        for val in wanted_item:
+            if val not in item:
+                return False
         return True
 
     return item == wanted_item

-- 
To view, visit https://gerrit.osmocom.org/3721
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27b372aa5906feac2843f24f5cdd0d9578d44b4d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list