don't fail on cube's pkginfo without __use__ stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 15 Apr 2010 16:47:04 +0200
branchstable
changeset 5288 92e9efc8cad5
parent 5287 6346f1fd0a50
child 5289 540fa73caac6
don't fail on cube's pkginfo without __use__
cwctl.py
--- a/cwctl.py	Thu Apr 15 16:46:43 2010 +0200
+++ b/cwctl.py	Thu Apr 15 16:47:04 2010 +0200
@@ -232,9 +232,11 @@
                 if not isinstance(use, dict):
                     use = dict((key, None) for key in use)
                     self.warnings.append('cube %s should define __depends_cubes__ as a dict not a list')
-            else:
+            elif hasattr(info, '__use__'):
                 self.warnings.append('cube %s should define __depends_cubes__' % cube)
                 use = dict((key, None) for key in info.__use__)
+            else:
+                continue
             for name, constraint in use.items():
                 self.constraints.setdefault(name,set())
                 if constraint: