diff --git a/homeassistant/components/dominos/__init__.py b/homeassistant/components/dominos/__init__.py index ce7b36f2280..9b11b667e84 100644 --- a/homeassistant/components/dominos/__init__.py +++ b/homeassistant/components/dominos/__init__.py @@ -4,11 +4,11 @@ from datetime import timedelta import logging from pizzapi import Address, Customer, Order -from pizzapi.address import StoreException import voluptuous as vol from homeassistant.components import http from homeassistant.core import HomeAssistant, ServiceCall, callback +from homeassistant.exceptions import HomeAssistantError import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity_component import EntityComponent @@ -118,7 +118,7 @@ class Dominos: self.country = conf.get(ATTR_COUNTRY) try: self.closest_store = self.address.closest_store() - except StoreException: + except Exception: # noqa: BLE001 self.closest_store = None def handle_order(self, call: ServiceCall) -> None: @@ -139,7 +139,7 @@ class Dominos: """Update the shared closest store (if open).""" try: self.closest_store = self.address.closest_store() - except StoreException: + except Exception: # noqa: BLE001 self.closest_store = None return False return True @@ -219,7 +219,7 @@ class DominosOrder(Entity): """Update the order state and refreshes the store.""" try: self.dominos.update_closest_store() - except StoreException: + except Exception: # noqa: BLE001 self._orderable = False return @@ -227,13 +227,13 @@ class DominosOrder(Entity): order = self.order() order.pay_with() self._orderable = True - except StoreException: + except Exception: # noqa: BLE001 self._orderable = False def order(self): """Create the order object.""" if self.dominos.closest_store is None: - raise StoreException + raise HomeAssistantError("No store available") order = Order( self.dominos.closest_store, @@ -252,7 +252,7 @@ class DominosOrder(Entity): try: order = self.order() order.place() - except StoreException: + except Exception: # noqa: BLE001 self._orderable = False _LOGGER.warning( "Attempted to order Dominos - Order invalid or store closed" diff --git a/homeassistant/components/dominos/manifest.json b/homeassistant/components/dominos/manifest.json index dfb8966013f..442f433db7c 100644 --- a/homeassistant/components/dominos/manifest.json +++ b/homeassistant/components/dominos/manifest.json @@ -6,5 +6,5 @@ "documentation": "https://www.home-assistant.io/integrations/dominos", "iot_class": "cloud_polling", "loggers": ["pizzapi"], - "requirements": ["pizzapi==0.0.3"] + "requirements": ["pizzapi==0.0.6"] } diff --git a/requirements_all.txt b/requirements_all.txt index ba3e2f5fadb..d44ea880636 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1557,7 +1557,7 @@ pigpio==1.78 pilight==0.1.1 # homeassistant.components.dominos -pizzapi==0.0.3 +pizzapi==0.0.6 # homeassistant.components.plex plexauth==0.0.6