hal/tools/device-manager Representation.py,1.7,1.8
Joe Shaw
joe at freedesktop.org
Fri Jul 30 10:23:20 PDT 2004
Update of /cvs/hal/hal/tools/device-manager
In directory pdx:/tmp/cvs-serv26310/tools/device-manager
Modified Files:
Representation.py
Log Message:
2004-07-30 Joe Shaw <joeshaw at novell.com>
* tools/device-manager/Representation.py (get_icon): Use get()
rather than indexing for "info.property" so that we can fall
back and not throw an exception if a device doesn't have it
set (as virtual devices often don't).
Index: Representation.py
===================================================================
RCS file: /cvs/hal/hal/tools/device-manager/Representation.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Representation.py 22 Jul 2004 00:31:45 -0000 1.7
+++ Representation.py 30 Jul 2004 17:23:18 -0000 1.8
@@ -46,7 +46,7 @@
# Default to abstract icon
icon = self.icons["abstract"]
- product = device.properties["info.product"]
+ product = device.properties.get("info.product", "")
if product=="Computer":
return self.icons["computer"]
More information about the hal-commit
mailing list