From b091f416990b3bc6c36760a6ee12345ea92c4059 Mon Sep 17 00:00:00 2001 From: Xyphuz Date: Thu, 19 May 2022 00:44:18 +0800 Subject: [PATCH] feat: implement AttributeError in Service initialization --- compose_viz/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compose_viz/service.py b/compose_viz/service.py index 336bab9..b8cb99a 100644 --- a/compose_viz/service.py +++ b/compose_viz/service.py @@ -18,10 +18,10 @@ class Service: self._name = name if image is None and extends is None: - raise ValueError(f"Both image and extends are not defined in service '{name}', aborting.") + raise AttributeError(f"Both image and extends are not defined in service '{name}', aborting.") if image is not None and extends is not None: - raise ValueError(f"Only one of image and extends can be defined in service '{name}', aborting.") + raise AttributeError(f"Only one of image and extends can be defined in service '{name}', aborting.") self._image = image self._ports = ports