summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2017-06-01 15:40:10 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-06-02 15:13:34 +0000
commit5098b03916fd7a90605b6e3774ee536ef9108a94 (patch)
treead69fe89affff3f4fefbaa9caede15308b273f16
parent49a6fcd515f5f778d4be55579eab6daee1c83574 (diff)
downloadipmi-fru-parser-5098b03916fd7a90605b6e3774ee536ef9108a94.zip
ipmi-fru-parser-5098b03916fd7a90605b6e3774ee536ef9108a94.tar.gz
fru_gen: fixes for python3
The iter{keys,items} functions have become just 'keys' and 'items' in python3. Python2 also has keys and items, which is slightly less efficient for iteration but none of these maps are large enough to be of concern. Change-Id: If6e8f36ad39074e0a6c022fb09e3a43b0928af19 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
-rw-r--r--scripts/extra-properties.mako.cpp6
-rw-r--r--scripts/writefru.mako.cpp10
2 files changed, 8 insertions, 8 deletions
diff --git a/scripts/extra-properties.mako.cpp b/scripts/extra-properties.mako.cpp
index 03c730a..e566cec 100644
--- a/scripts/extra-properties.mako.cpp
+++ b/scripts/extra-properties.mako.cpp
@@ -7,14 +7,14 @@
using namespace ipmi::vpd;
extern const std::map<Path, InterfaceMap> extras = {
-% for path in dict.iterkeys():
+% for path in dict.keys():
<%
interfaces = dict[path]
%>\
{"${path}",{
- % for interface,properties in interfaces.iteritems():
+ % for interface,properties in interfaces.items():
{"${interface}",{
- % for property,value in properties.iteritems():
+ % for property,value in properties.items():
{"${property}", ${value}},
% endfor
}},
diff --git a/scripts/writefru.mako.cpp b/scripts/writefru.mako.cpp
index 7573862..6180e13 100644
--- a/scripts/writefru.mako.cpp
+++ b/scripts/writefru.mako.cpp
@@ -3,18 +3,18 @@
#include "frup.hpp"
extern const FruMap frus = {
-% for key in fruDict.iterkeys():
+% for key in fruDict.keys():
{${key},{
<%
fru = fruDict[key]
%>
- % for object,interfaces in fru.iteritems():
+ % for object,interfaces in fru.items():
{"${object}",{
- % for interface,properties in interfaces.iteritems():
+ % for interface,properties in interfaces.items():
{"${interface}",{
- % for dbus_property,property_value in properties.iteritems():
+ % for dbus_property,property_value in properties.items():
{"${dbus_property}",{
- % for name,value in property_value.iteritems():
+ % for name,value in property_value.items():
{"${name}","${value}"},
% endfor
}},
OpenPOWER on IntegriCloud