diff options
author | Douglas Anderson <danderson@ntia.doc.gov> | 2017-02-12 15:52:19 -0800 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2017-02-26 18:21:22 -0800 |
commit | 9e625c4821f4c63421b3d3747c0c4f358fef6c5f (patch) | |
tree | 41dedbe053417be7314cdce15d64fbbb89db4d8d /gnuradio-runtime/python/build_utils.py | |
parent | e5aabcc6a4a9335f3ef8abf5f89104b626e9364d (diff) |
python3: update non-GRC components to use python2 or python3
Diffstat (limited to 'gnuradio-runtime/python/build_utils.py')
-rw-r--r-- | gnuradio-runtime/python/build_utils.py | 9 |
1 files changed, 5 insertions, 4 deletions
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): |