Skip to content

Commit

Permalink
Don't retrieve Tinderbox directory listing when timestamp is provided (
Browse files Browse the repository at this point in the history
…#313) - re-arrange if-else
  • Loading branch information
piri-p committed May 8, 2024
1 parent d852fca commit 191ca2a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mozdownload/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,9 @@ def get_build_info_for_index(self, build_index=None):
"""Get additional information for the build at the given index."""
url = urljoin(self.base_url, self.build_list_regex)

if not self.timestamp:
if self.timestamp:
entries = [self.timestamp]
else:
self.logger.info('Retrieving list of builds from %s' % url)
parser = self._create_directory_parser(url)
parser.entries = parser.filter(r'^\d+$')
Expand All @@ -975,11 +977,6 @@ def get_build_info_for_index(self, build_index=None):

entries = parser.entries

else:
# If a timestamp is given, retrieve the folder with the timestamp
# as name
entries = [self.timestamp]

self.show_matching_builds(entries)

# If no index has been given, set it to the last build of the day.
Expand Down

0 comments on commit 191ca2a

Please sign in to comment.