From 5cef90bc27e5c050e605915777d5eceff28a962f Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Fri, 17 Mar 2023 23:57:53 -0300 Subject: [PATCH] test: skip non-files when checking for dead urls in test-ns3.py --- utils/tests/test-ns3.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/tests/test-ns3.py b/utils/tests/test-ns3.py index 994d55401..8be19de99 100755 --- a/utils/tests/test-ns3.py +++ b/utils/tests/test-ns3.py @@ -2810,10 +2810,15 @@ class NS3QualityControlTestCase(unittest.TestCase): if "build" in root or "_static" in root or "source-temp" in root or 'html' in root: continue for file in files: + filepath = os.path.join(root, file) + + # skip everything that isn't a file + if not os.path.isfile(filepath): + continue + # skip svg files if file.endswith(".svg"): continue - filepath = os.path.join(root, file) try: with open(filepath, "r") as f: