Switch to python 3

The python scripts in this repo supports both python2 and python3.
Use python3 now since python2 is EOL.

Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Change-Id: I858553eb9ec86c2010e649679dee1607006e89b3
diff --git a/configure.ac b/configure.ac
index be4f46a..2faca39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,9 +12,9 @@
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 AC_PROG_AWK
-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.
 PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
diff --git a/src/pdmgen.py b/src/pdmgen.py
index ef1b790..53e192e 100755
--- a/src/pdmgen.py
+++ b/src/pdmgen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''Phosphor DBus Monitor YAML parser and code generator.
 
@@ -1290,9 +1290,7 @@
             lambda x: x.endswith('.yaml'),
             os.listdir(args.inputdir))
 
-        yaml_files.sort()
-
-        for x in yaml_files:
+        for x in sorted(yaml_files):
             path = os.path.join(args.inputdir, x)
             with open(path, 'r') as fd:
                 Everything.load_one_yaml(path, fd, objs)