From 43be8f0e9cddf9e5bc798bdbad3442dcea0b7753 Mon Sep 17 00:00:00 2001 From: lethliel Date: Fri, 8 Dec 2017 13:20:24 +0100 Subject: [PATCH] add meaningful error if no attribute name --- osc/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osc/core.py b/osc/core.py index 7747d43d..bff9d610 100644 --- a/osc/core.py +++ b/osc/core.py @@ -288,6 +288,8 @@ class Serviceinfo: for service in services: name = service.get('name') + if name is None: + error("invalid service definition. Attribute name missing.", service) if len(name) < 3 or '/' in name: error("invalid service name: %s" % name, service) mode = service.get('mode', '')