fix: do not catch bare exceptions

Bare excepts will catch keyboard-exit exceptions, system-exit etc. which
is probably not what we want.
This commit is contained in:
Alexis Métaireau 2024-05-22 15:23:17 +02:00
parent 65a8827daa
commit eba30f3c17
No known key found for this signature in database
GPG key ID: C65C7A89A8FFC56E
2 changed files with 2 additions and 2 deletions

View file

@ -124,7 +124,7 @@ class Container(IsolationProvider):
[Container.get_runtime(), "rmi", "--force", found_image_id],
startupinfo=get_subprocess_startupinfo(),
)
except:
except Exception:
log.warning("Couldn't delete old container image, so leaving it there")
return installed

View file

@ -79,7 +79,7 @@ class Settings:
if version.parse(get_version()) > version.parse(self.get(key)):
self.set(key, get_version())
except:
except Exception:
log.error("Error loading settings, falling back to default")
self.settings = self.default_settings