diff frontends/src/quick_frontend/quick_widgets.py @ 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 19b9d3f8a6c7
children 6353deb1bd73
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):