diff options
| author | Huang Peng <shawn.p.huang@gmail.com> | 2008-08-19 09:23:37 +0800 |
|---|---|---|
| committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-08-19 09:23:37 +0800 |
| commit | 4d34dbaff9e0163ce9c1005dac11797e5ca6b7ca (patch) | |
| tree | b62260b105aeb8505c19ba06d058d31e820cce9d /ibus | |
| parent | 539913da27823ee2884b60db92ae87a94d654069 (diff) | |
| download | ibus-4d34dbaff9e0163ce9c1005dac11797e5ca6b7ca.tar.gz ibus-4d34dbaff9e0163ce9c1005dac11797e5ca6b7ca.tar.xz ibus-4d34dbaff9e0163ce9c1005dac11797e5ca6b7ca.zip | |
Refine code.
Diffstat (limited to 'ibus')
| -rw-r--r-- | ibus/property.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ibus/property.py b/ibus/property.py index 5a952e7..da769ce 100644 --- a/ibus/property.py +++ b/ibus/property.py @@ -51,6 +51,7 @@ def _to_unicode(text): return text if isinstance(text, str): return unicode(text, "utf8") + raise TypeError("text must be instance of unicode or str") class Property(object): def __init__(self, name, @@ -238,6 +239,9 @@ def test(): props.append(p) value = props.to_dbus_value() print prop_list_from_dbus_value(value) + p.label = u"a" + p.label = "a" + p.label = 1 if __name__ == "__main__": test() |
