2018-05-18 17:17:29

by Seth Forshee

[permalink] [raw]
Subject: [PATCH] wireless-regdb: Fix iteration in create_wmms() for python 3

The iteration in this function is over countries.itervalues(),
which is not compatible with python 3. Switch to iterating over
contries.values() instead.

Signed-off-by: Seth Forshee <[email protected]>
---
db2fw.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/db2fw.py b/db2fw.py
index 269325604ea3..0c0f030c0c63 100755
--- a/db2fw.py
+++ b/db2fw.py
@@ -29,7 +29,7 @@ def create_collections(countries):

def create_wmms(countries):
result = {}
- for c in countries.itervalues():
+ for c in countries.values():
for rule in c.permissions:
if rule.wmmrule is not None:
result[rule.wmmrule] = 1
--
2.17.0


2018-05-25 16:34:15

by Seth Forshee

[permalink] [raw]
Subject: Re: [PATCH] wireless-regdb: Fix iteration in create_wmms() for python 3

On Fri, May 18, 2018 at 12:17:25PM -0500, Seth Forshee wrote:
> The iteration in this function is over countries.itervalues(),
> which is not compatible with python 3. Switch to iterating over
> contries.values() instead.
>
> Signed-off-by: Seth Forshee <[email protected]>

Applied.