From b0f69ff0e38b8a8a5729e2131e90c55be77bb12a Mon Sep 17 00:00:00 2001
From: Brennan Ashton <bashton@brennanashton.com>
Date: Wed, 14 Nov 2018 18:02:31 -0800
Subject: gr-fec: Improve handeling of failure opening alist file

---
 gr-fec/python/fec/LDPC/Generate_LDPC_matrix_functions.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'gr-fec/python')

diff --git a/gr-fec/python/fec/LDPC/Generate_LDPC_matrix_functions.py b/gr-fec/python/fec/LDPC/Generate_LDPC_matrix_functions.py
index 6cf0dee09e..4b18a90408 100644
--- a/gr-fec/python/fec/LDPC/Generate_LDPC_matrix_functions.py
+++ b/gr-fec/python/fec/LDPC/Generate_LDPC_matrix_functions.py
@@ -65,7 +65,9 @@ def write_alist_file(filename, H, verbose=0):
 
   try:
     myfile = open(filename,'w')
-  except:
+  except EnvironmentError:
+    # This is an api, we should be using a logging interface and not
+    # terminating the application directly.
     sys.stderr.write("Could not open output file '{0}'".format(filename))
     sys.exit(1)
 
-- 
cgit v1.2.3