File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,21 @@ def run_module(): # pylint: disable=missing-function-docstring
6161 timestamps = dict (module .params ["repos_dict" ])
6262 for repo in timestamps :
6363 for version in timestamps [repo ]:
64-
65- html_txt = requests .get (
66- url = module .params ["content_url" ]
64+ url = (
65+ module .params ["content_url" ]
6766 + "/"
6867 + timestamps [repo ][version ]["pulp_path" ]
69- ).text
68+ )
69+ html = requests .get (url = url )
70+ if not html .ok :
71+ module .fail_json (
72+ msg = (
73+ f"Couldn't retrieve timestamps for { repo } [{ version } ]"
74+ f"url { url } : { html .status_code } { html .text } "
75+ )
76+ )
7077 timestamp_link_list = (
71- BeautifulSoup (html_txt , features = "html.parser" )
78+ BeautifulSoup (html . text , features = "html.parser" )
7279 .body .find ("pre" )
7380 .find_all ()
7481 ) # getting raw list of timestamps from html
You can’t perform that action at this time.
0 commit comments