Skip to content

Commit fa3d842

Browse files
committed
[Tests][Fixed] curl_command not defined during tests
1 parent 7b45432 commit fa3d842

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

kibot/out_download_datasheets.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def __init__(self):
6262
# Used to collect the targets
6363
self._dry = False
6464
self._unknown_is_error = True
65+
self._curl_command = None # We detect it on `run`
6566

6667
def config(self, parent):
6768
super().config(parent)
@@ -94,9 +95,9 @@ def download(self, c, ds, dir, name, known):
9495
# Download
9596
if not self._dry:
9697
downloaded = False
97-
if self.curl_command:
98+
if self._curl_command:
9899
# Using curl
99-
cmd = [self.curl_command, '-o', dest, ds]
100+
cmd = [self._curl_command, '-o', dest, ds]
100101
try:
101102
run_command(cmd, just_raise=True)
102103
downloaded = True
@@ -164,7 +165,7 @@ def run(self, output_dir):
164165
# Add a dummy filter to force the creation of a components list
165166
self.dnf_filter = DummyFilter()
166167
super().run(output_dir)
167-
self.curl_command = self.check_tool('Curl')
168+
self._curl_command = self.check_tool('Curl')
168169
self._urls = {}
169170
self._downloaded = set()
170171
self._created = []

0 commit comments

Comments
 (0)