You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/03/21 11:23:17 UTC

[08/17] libcloud git commit: fixes iteration over keys in _to_zone, _to_record

fixes iteration over keys in _to_zone, _to_record


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/990749bb
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/990749bb
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/990749bb

Branch: refs/heads/trunk
Commit: 990749bb5ee9ecba7f19b1718cca453b67f1a4b7
Parents: 1d85a2c
Author: lostbird <lostbird@lostbird.(none)>
Authored: Mon Feb 29 17:17:48 2016 +0100
Committer: anthony-shaw <an...@gmail.com>
Committed: Mon Mar 21 21:20:31 2016 +1100

----------------------------------------------------------------------
 libcloud/dns/drivers/nsone.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/990749bb/libcloud/dns/drivers/nsone.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/nsone.py b/libcloud/dns/drivers/nsone.py
index 3b903a3..3de153d 100644
--- a/libcloud/dns/drivers/nsone.py
+++ b/libcloud/dns/drivers/nsone.py
@@ -288,7 +288,7 @@ class NsOneDNSDriver(DNSDriver):
     def _to_zone(self, item):
         common_attr = ['zone', 'id', 'type']
         extra = {}
-        for key in item:
+        for key in item.keys():
             if key not in common_attr:
                 extra[key] = item.get(key)
 
@@ -307,7 +307,7 @@ class NsOneDNSDriver(DNSDriver):
     def _to_record(self, item, zone):
         common_attr = ['id', 'short_answers', 'answers', 'domain', 'type']
         extra = {}
-        for key in item:
+        for key in item.keys():
             if key not in common_attr:
                 extra[key] = item.get(key)
         if item.get('answers') is not None: