From 9e625c4821f4c63421b3d3747c0c4f358fef6c5f Mon Sep 17 00:00:00 2001
From: Douglas Anderson <danderson@ntia.doc.gov>
Date: Sun, 12 Feb 2017 15:52:19 -0800
Subject: python3: update non-GRC components to use python2 or python3

---
 gnuradio-runtime/python/build_utils.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'gnuradio-runtime/python/build_utils.py')

diff --git a/gnuradio-runtime/python/build_utils.py b/gnuradio-runtime/python/build_utils.py
index cf58a97637..82a2265cc2 100644
--- a/gnuradio-runtime/python/build_utils.py
+++ b/gnuradio-runtime/python/build_utils.py
@@ -21,6 +21,7 @@
 
 """Misc utilities used at build time
 """
+from __future__ import unicode_literals
 
 import re, os, os.path
 from build_utils_codes import *
@@ -29,7 +30,7 @@ from build_utils_codes import *
 # set srcdir to the directory that contains Makefile.am
 try:
     srcdir = os.environ['srcdir']
-except KeyError, e:
+except KeyError as e:
     srcdir = "."
 srcdir = srcdir + '/'
 
@@ -39,7 +40,7 @@ try:
         do_makefile = False
     else:
         do_makefile = True
-except KeyError, e:
+except KeyError as e:
     do_makefile = False
 
 # set do_sources to either true or false dependeing on the environment
@@ -48,7 +49,7 @@ try:
         do_sources = False
     else:
         do_sources = True
-except KeyError, e:
+except KeyError as e:
     do_sources = True
 
 name_dict = {}
@@ -127,7 +128,7 @@ def extract_extension (template_name):
     # we return everything between the penultimate . and .t
     mo = re.search (r'\.([a-z]+)\.t$', template_name)
     if not mo:
-        raise ValueError, "Incorrectly formed template_name '%s'" % (template_name,)
+        raise ValueError("Incorrectly formed template_name '%s'" % (template_name,))
     return mo.group (1)
 
 def open_src (name, mode):
-- 
cgit v1.2.3