diff --git a/debian/patches/series b/debian/patches/series index 6bf742f55..1fcce9ae8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -76,6 +76,7 @@ sipwise/rtpengine-flags-for-everything.patch sipwise/pv_headers-full-rework.patch sipwise/pua_dialoginfo-refresh_pubruri_avps_flag.patch sipwise/pua_dialoginfo-local_identity_dlg_var.patch +sipwise/dbtextdb_fix_exception_handling # ### Don't just put stuff in any order ### use gbp pq import/export tooling to help maintain patches diff --git a/debian/patches/sipwise/dbtextdb_fix_exception_handling b/debian/patches/sipwise/dbtextdb_fix_exception_handling new file mode 100644 index 000000000..0cbe742cf --- /dev/null +++ b/debian/patches/sipwise/dbtextdb_fix_exception_handling @@ -0,0 +1,35 @@ +--- a/utils/kamctl/dbtextdb/dbtextdb.py ++++ b/utils/kamctl/dbtextdb/dbtextdb.py +@@ -993,12 +993,12 @@ + try: + if val: + val = eval(val) +- except (NameError, e): ++ except NameError as e: + raise ExecuteError('Failed to parse %s in %s ' + '(unable to convert to type %s): %s' % + (col, self.table, self.header[col]['type'], + e)) +- except (SyntaxError, e): ++ except SyntaxError as e: + raise ExecuteError('Failed to parse %s in %s ' + '(unable to convert to type %s): %s' % + (col, self.table, self.header[col]['type'], +@@ -1083,7 +1083,7 @@ + # save a copy of the data before modifying + self.orig_data = self.data[:] + +- except (IOError, e): ++ except IOError as e: + raise ExecuteError('Unable to open table %s: %s' % (self.table, e)) + + Debug('Header is: %s' % self.header) +@@ -1230,7 +1230,7 @@ + print('Updated %s, rows affected: %d' % (conn.table, row)) + else: + print(row) +- except (Error, e): ++ except Error as e: + print(e) + sys.exit(1) +