Skip to content

Commit

Permalink
Ignore none as possible root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Commandcracker committed Dec 29, 2023
1 parent 86a2a52 commit e3f471b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build-scripts/generate_guides.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
"/opt/local",
]

for name in OPENSCAP_POSSIBLE_ROOT_DIRS:
for root_dir in OPENSCAP_POSSIBLE_ROOT_DIRS:
if root_dir is None:
continue
for subpath in [os.path.join("share", "openscap", "xsl"), "xsl"]:
file_path = os.path.join(name, subpath, "xccdf-guide.xsl")
file_path = os.path.join(root_dir, subpath, "xccdf-guide.xsl")
if os.path.exists(file_path):
XCCDF_GUIDE_XSL = file_path
break
Expand Down

0 comments on commit e3f471b

Please sign in to comment.