SEBA-538 prevent generating docs for xosgenx unit tests
Change-Id: Iab1424b0b191030a7b994d3721f0b3535b1e50f6
diff --git a/docs/scripts/swagger_docs.py b/docs/scripts/swagger_docs.py
index 1bf2b16..a5cd849 100644
--- a/docs/scripts/swagger_docs.py
+++ b/docs/scripts/swagger_docs.py
@@ -48,6 +48,12 @@
items = os.listdir(root)
# iterate over the content of the folder excluding hidden items
for item in [i for i in items if i[0] is not "."]:
+ if ("venv" in item) or ("virtualenv" in item):
+ # avoid recursing through virtual env directories
+ continue
+ if "xos-genx-tests" in item:
+ # don't generate docs for xosgenx's unit tests
+ continue
item_abs_path = os.path.abspath(root + "/" + item)
if os.path.isdir(item_abs_path):
files = files + get_xproto_recursively(item_abs_path)