summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2018-02-05 12:00:02 +0100
committerMarcus Müller <marcus@hostalia.de>2018-02-05 12:00:02 +0100
commit5473d529f69810bbb8f275779a188b47bdbd2002 (patch)
treedcee788832164594aaf0e7c5209e3806c2593085
parentacb0464327b312a9b0268ba2cc1fa6877fb7530c (diff)
modtool_add: __exit__ now takes 4 arguments, instead of none
Python defines __exit__ to take 4 arguments (self + error info); code only took 1, whih breaks if there is an exception thrown within the with: block. Addresses #1577.
-rw-r--r--gr-utils/python/modtool/modtool_add.py2
-rw-r--r--gr-utils/python/modtool/util_functions.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/gr-utils/python/modtool/modtool_add.py b/gr-utils/python/modtool/modtool_add.py
index 21fcd28900..6719a02948 100644
--- a/gr-utils/python/modtool/modtool_add.py
+++ b/gr-utils/python/modtool/modtool_add.py
@@ -1,5 +1,5 @@
#
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013, 2017 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
diff --git a/gr-utils/python/modtool/util_functions.py b/gr-utils/python/modtool/util_functions.py
index 6bb95f3d67..b20970175c 100644
--- a/gr-utils/python/modtool/util_functions.py
+++ b/gr-utils/python/modtool/util_functions.py
@@ -1,5 +1,5 @@
#
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013, 2018 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -169,5 +169,5 @@ class SequenceCompleter(object):
readline.set_completer(self.completefunc)
readline.parse_and_bind("tab: complete")
- def __exit__(self):
+ def __exit__(self, exception_type, exception_value, traceback):
readline.set_completer(self._old_completer)