diff --git a/test/test_utils.py b/test/test_utils.py
index 4d7f5aae5549aa76cceb8a695131567b47a0fa9e..30845e257657c7c0bd5b42fea0f4fcab8d986bf5 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -241,13 +241,13 @@ def test_pulsar_app(global_conf={}, app_conf={}, test_conf={}):
     finally:
         try:
             app.shutdown()
-        except:
+        except Exception:
             pass
         for directory in [staging_directory, cache_directory]:
             try:
                 rmtree(directory)
                 pass
-            except:
+            except Exception:
                 pass