test: skip non-files when checking for dead urls in test-ns3.py

This commit is contained in:
Gabriel Ferreira
2023-03-17 23:57:53 -03:00
parent fa477e061e
commit 5cef90bc27

View File

@@ -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: