mirror of https://github.com/sipwise/kamailio.git
Fails due to: | Traceback (most recent call last): | File "/usr/lib/x86_64-linux-gnu/kamailio/kamctl/dbtextdb/dbtextdb.py", line 1239, in <module> | main(sys.argv) | File "/usr/lib/x86_64-linux-gnu/kamailio/kamctl/dbtextdb/dbtextdb.py", line 1233, in main | except (Error, e): | NameError: name 'e' is not defined Change-Id: I09ed6d0bd1b6fdad5f9b04cd54fef1ee43a44312changes/07/39807/1
parent
02ba8431d5
commit
00e482f661
@ -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)
|
||||
|
||||
Loading…
Reference in new issue