@@ -117,7 +117,10 @@ def pull(self, component_name: str) -> None:
117
117
118
118
# if there is no curses support, like in the testing environment, just dump everything
119
119
if not curses_ui :
120
- self .client .images .pull (f"{ image_name } :{ tag } " )
120
+ try :
121
+ self .client .images .pull (f"{ image_name } :{ tag } " )
122
+ except Exception as exception :
123
+ logger .warning (f"Failed to pull image ({ image_name } :{ tag } ): { exception } " )
121
124
return
122
125
123
126
# if there is ncurses support, proceed with it
@@ -154,8 +157,12 @@ def pull(self, component_name: str) -> None:
154
157
155
158
def image_is_available_locally (self , image_name : str , tag : str ) -> bool :
156
159
"""Checks if the image is already available locally"""
157
- images = self .client .images .list (image_name )
158
- return any (f"{ image_name } :{ tag } " in image .tags for image in images )
160
+ try :
161
+ images = self .client .images .list (image_name )
162
+ return any (f"{ image_name } :{ tag } " in image .tags for image in images )
163
+ except Exception as exception :
164
+ logger .warning (f"Failed to list image ({ image_name } ): { exception } " )
165
+ return false
159
166
160
167
def start (self , component_name : str ) -> bool :
161
168
"""Loads settings and starts the containers. Loads default settings if no settings are found
@@ -218,7 +225,11 @@ def is_running(self, component: str) -> bool:
218
225
Returns:
219
226
bool: True if the chosen container is running
220
227
"""
221
- return any (container .name .endswith (component ) for container in self .client .containers .list ())
228
+ try :
229
+ return any (container .name .endswith (component ) for container in self .client .containers .list ())
230
+ except Exception as exception :
231
+ logger .warning (f"Could not list containers: { exception } " )
232
+ return False
222
233
223
234
def is_version_chooser_online (self ) -> bool :
224
235
"""Check if the version chooser service is online.
0 commit comments