summaryrefslogtreecommitdiff
path: root/gr-utils/python
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2019-04-21 16:58:40 +0200
committerMarcus Müller <mmueller@gnuradio.org>2019-04-21 17:48:55 +0200
commit98423e289bd03efa3911fabb8e2d3d77ef02f6c9 (patch)
treee3cb9da1bc62aca7e335dc9340947def8ed611f7 /gr-utils/python
parent474b5dd132eb8a1e47d878786df17dfffb37b077 (diff)
modtool test: Don't silence ResourceWarning on systems without it
Diffstat (limited to 'gr-utils/python')
-rw-r--r--gr-utils/python/modtool/tests/test_modtool.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gr-utils/python/modtool/tests/test_modtool.py b/gr-utils/python/modtool/tests/test_modtool.py
index 3cfd735f90..957a5e7d54 100644
--- a/gr-utils/python/modtool/tests/test_modtool.py
+++ b/gr-utils/python/modtool/tests/test_modtool.py
@@ -64,7 +64,11 @@ class TestModToolCore(unittest.TestCase):
def setUp(self):
""" create a new module and block before every test """
try:
- warnings.simplefilter("ignore", ResourceWarning)
+ try:
+ warnings.simplefilter("ignore", ResourceWarning)
+ except (NameError):
+ # Python2 , Python3 < 3.2 don't know ResourceWarning
+ pass
args = {'module_name':'howto',
'directory': self.test_dir,
'srcdir': self.srcdir}