From 21bdd2cbca3f9c0bbce004e8fbe7052806be0751 Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 8 Aug 2016 00:49:17 +0200 Subject: [PATCH] quick frontend (widget): minor profiles check on widget creation --- frontends/src/quick_frontend/quick_widgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/src/quick_frontend/quick_widgets.py b/frontends/src/quick_frontend/quick_widgets.py index dd339ab5..ca6f5012 100644 --- a/frontends/src/quick_frontend/quick_widgets.py +++ b/frontends/src/quick_frontend/quick_widgets.py @@ -275,10 +275,10 @@ class QuickWidget(object): if not self.PROFILES_ALLOW_NONE: raise ValueError("profiles can't have a value of None") else: - if not self.PROFILES_MULTIPLE and len(profiles) != 1: - raise ValueError("multiple profiles are not allowed") for profile in profiles: self.addProfile(profile) + if not self.profiles: + raise ValueError("no profile found, use None for no profile classes") @property def profile(self):