X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fscreens%2Fmainscreen.py;h=9bb94ccd5d7011df5b0d4449d7b4d97472f25dd6;hp=c9911eeff645b5394227ab5351d382a0ae790cf4;hb=66adcf0e47106c3809e8b29c91edb2cc32b36081;hpb=9de90adda331169634bc46376edebef60ecd6978 diff --git a/sface/screens/mainscreen.py b/sface/screens/mainscreen.py index c9911ee..9bb94cc 100644 --- a/sface/screens/mainscreen.py +++ b/sface/screens/mainscreen.py @@ -176,7 +176,10 @@ class NodeNameDelegate(QStyledItemDelegate): QStyledItemDelegate.__init__(self, parent) def displayText(self, value, locale): - data = str(QStyledItemDelegate.displayText(self, value, locale)) + try: + data = str(QStyledItemDelegate.displayText(self, value, locale)) + except UnicodeEncodeError: + data = "" if (len(data)>NAME_MAX_LEN): data = data[:(NAME_MAX_LEN-3)] + "..." return QString(data) @@ -685,7 +688,13 @@ class SliceWidget(QWidget): "%s: %s" % (name, value), membership=tag_status['in'], kind="attribute") - + disk_images = node.get("disk_image", []) + for disk_image in disk_images: + name = disk_image.get("name", None) + self.noveView.appendRow(nodeItem, name, + membership=node_status['in'], + kind="attribute") + for node in available_nodes: nodeType = None if ("hardware_types" in node):