Hi,

dictview is a new class in Python 2.7. We need to support older Python 
versions and thus, use set instead.

-- 
/ Alexander Bokovoy
>From 169210f725d753d0707c0ee05c659747193fd6e5 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <aboko...@redhat.com>
Date: Fri, 14 Oct 2011 17:40:26 +0300
Subject: [PATCH] Use set class instead of dictview class as set is wider
 supported

---
 ipapython/ipautil.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py
index 
75e8e6fdf32c4c1ca74fd7990c1070f7bdfed219..718f209b32649df23177dcab7d5105d01c0cd7bc
 100644
--- a/ipapython/ipautil.py
+++ b/ipapython/ipautil.py
@@ -1244,8 +1244,8 @@ $)''', re.VERBOSE)
         # Now add all options from replacevars and appendvars that were not 
found in the file
         new_vars = replacevars.copy()
         new_vars.update(appendvars)
-        newvars_view = new_vars.viewkeys() - old_values.viewkeys()
-        append_view = (appendvars.viewkeys() - replacevars.viewkeys()) - 
old_values.viewkeys()
+        newvars_view = set(new_vars.keys()) - set(old_values.keys())
+        append_view = (set(appendvars.keys()) - set(replacevars.keys())) - 
set(old_values.keys())
         for item in newvars_view:
             new_config.write("%s=%s\n" % (item,new_vars[item]))
         for item in append_view:
-- 
1.7.6.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to