Skip to content

Commit

Permalink
Fix AttributeError in BuilderSupervisor
Browse files Browse the repository at this point in the history
  • Loading branch information
anfimovdm committed Dec 10, 2024
1 parent da50d10 commit 149591d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions build_node/build_node_supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,20 @@ def __report_active_tasks(self):

def get_excluded_packages(self):
if 'excluded_packages' not in self.__cached_config:
uri = f'{self.__config.exclusions_url}/{self.__config.build_node_name}'
uri = urllib.parse.urljoin(
self.config.exclusions_url,
self.config.build_node_name,
)
if file_url_exists(uri):
response = requests.get(uri).text
self.__cached_config['excluded_packages'] = response.splitlines()

try:
response = requests.get(uri)
response.raise_for_status()
self.__cached_config['excluded_packages'] = (
response.text.splitlines()
)
except Exception:
logging.exception('Cannot get excluded packages')
return []
return self.__cached_config.get('excluded_packages', [])

def run(self):
Expand Down

0 comments on commit 149591d

Please sign in to comment.