changeset 2027:666b42c957b5

quick frontend (widget): minor profiles check on widget creation
author Goffi <goffi@goffi.org>
date Mon, 08 Aug 2016 00:49:17 +0200
parents cdb2591d0b8b
children 70bd7b242a9e
files frontends/src/quick_frontend/quick_widgets.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_widgets.py	Mon Aug 08 00:48:22 2016 +0200
+++ b/frontends/src/quick_frontend/quick_widgets.py	Mon Aug 08 00:49:17 2016 +0200
@@ -275,10 +275,10 @@
             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):