scripts: convert to python3

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5ac0c1ac6f5420ec9763419223e651c3f887afe6
diff --git a/configure.ac b/configure.ac
index 19da3d3..47c31bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,9 +13,9 @@
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 AC_PROG_LN_S
-AM_PATH_PYTHON([2.7],
+AM_PATH_PYTHON([3],
     [AC_SUBST([PYTHON], [echo "$PYTHON"])],
-    [AC_MSG_ERROR([Could not find python-2.7 installed...python-2.7 is required])])
+    [AC_MSG_ERROR([Could not find python-3 installed...python-3 is required])])
 
 # Checks for libraries.
 AC_CHECK_LIB([mapper], [mapper_get_service],,\
diff --git a/scripts/extra-properties.py b/scripts/extra-properties.py
index 0baa3e0..c63ec9c 100755
--- a/scripts/extra-properties.py
+++ b/scripts/extra-properties.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 import yaml
diff --git a/scripts/fru_gen.py b/scripts/fru_gen.py
index 2771498..5241f2f 100755
--- a/scripts/fru_gen.py
+++ b/scripts/fru_gen.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/gen_pimrules.py b/scripts/gen_pimrules.py
index a529e23..7a0e479 100755
--- a/scripts/gen_pimrules.py
+++ b/scripts/gen_pimrules.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''Generate PIM rules for ipmi-fru-parser.
 '''
@@ -123,10 +123,10 @@
 def get_cacheable_objs(yaml):
     cacheable = []
 
-    for objdata in data.itervalues():
+    for objdata in data.values():
         if not isinstance(objdata, dict):
             continue
-        for path, ifaces in objdata.iteritems():
+        for path, ifaces in objdata.items():
             if not isinstance(ifaces, dict):
                 continue