summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/ic.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Mac/Lib/ic.py b/Mac/Lib/ic.py
index 6388de5..47091c7 100644
--- a/Mac/Lib/ic.py
+++ b/Mac/Lib/ic.py
@@ -65,7 +65,6 @@ def _decode_fontrecord(data, key):
return size, face, data[5:5+namelen]
def _decode_boolean(data, key):
- print 'XXXX boolean:', `data`
return ord(data[0])
def _decode_text(data, key):
@@ -175,6 +174,13 @@ class IC:
self.ic.ICEnd()
return rv
+ def has_key(self, key):
+ try:
+ dummy = self.ic.ICFindPrefHandle(key, self.h)
+ except icglue.error:
+ return 0
+ return 1
+
def __getitem__(self, key):
attr = self.ic.ICFindPrefHandle(key, self.h)
return _decode(self.h.data, key)