[c-c list] don't crash if there are no 'version' attribute in pkginfo stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 19 Jan 2011 11:23:16 +0100
branchstable
changeset 6845 027c93dfba0a
parent 6844 5ae2bc554c23
child 6846 4dd1df437e15
[c-c list] don't crash if there are no 'version' attribute in pkginfo
cwctl.py
--- a/cwctl.py	Wed Jan 19 11:22:39 2011 +0100
+++ b/cwctl.py	Wed Jan 19 11:23:16 2011 +0100
@@ -235,7 +235,7 @@
                     tinfo = cwcfg.cube_pkginfo(cube)
                     tversion = tinfo.version
                     cfgpb.add_cube(cube, tversion)
-                except ConfigurationError, ex:
+                except (ConfigurationError, AttributeError), ex:
                     tinfo = None
                     tversion = '[missing cube information: %s]' % ex
                 print '* %s %s' % (cube.ljust(namesize), tversion)