scripts: convert to python3
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I46e84f79a2698aaee286a1cd1b339b3bbf7296d3
diff --git a/scripts/inventory-sensor.py b/scripts/inventory-sensor.py
index 1040cf0..eac8bb3 100755
--- a/scripts/inventory-sensor.py
+++ b/scripts/inventory-sensor.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os
import sys
@@ -43,7 +43,7 @@
parser.add_argument(
'command', metavar='COMMAND', type=str,
- choices=valid_commands.keys(),
+ choices=list(valid_commands.keys()),
help='Command to run.')
args = parser.parse_args()
diff --git a/scripts/inventorysensor.mako.cpp b/scripts/inventorysensor.mako.cpp
index 0689662..11c9f4e 100644
--- a/scripts/inventorysensor.mako.cpp
+++ b/scripts/inventorysensor.mako.cpp
@@ -6,7 +6,7 @@
#include "oemhandler.hpp"
extern const ObjectIDMap invSensors = {
-% for key in sensorDict.iterkeys():
+% for key in sensorDict.keys():
% if key:
{"${key}",
{