Skip to content

Commit 984430d

Browse files
committed
OSDOCS 11742 fix direct https includes with huge books
1 parent 89c0789 commit 984430d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build_for_portal.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,12 @@ def scrub_file(info, book_src_dir, src_file, tag=None, cwd=None):
623623
# procedure loads the file recognizing that it starts with http
624624
# it then checks if it exists or not, and if it exists, returns the raw data
625625
# data that it finds.
626-
if base_src_file.startswith("https://raw.githubusercontent.com/openshift/"):
626+
# modified 20/Aug/2024 to process https links which are preceded
627+
# by an added directory (happens with hugeBook)
628+
629+
https_pos = base_src_file.find("https://raw.githubusercontent.com/openshift/")
630+
if https_pos >=0:
631+
base_src_file = base_src_file[https_pos:]
627632
try:
628633
response = requests.get(base_src_file)
629634
if response:

0 commit comments

Comments
 (0)