diff options
| author | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2007-08-27 13:10:39 +0000 |
|---|---|---|
| committer | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2007-08-27 13:10:39 +0000 |
| commit | 078439f05b12ed4756e87f0e8c1c6ff1e93da880 (patch) | |
| tree | 1df614371ddd683f2977b5130c0e1f8831a62792 /gobject | |
| parent | 4c8bec8e5e7506ff386f234494e247ed5bc01026 (diff) | |
Bug 470230 – check for default value in boolean type is wrong
svn path=/trunk/; revision=698
Diffstat (limited to 'gobject')
| -rw-r--r-- | gobject/propertyhelper.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gobject/propertyhelper.py b/gobject/propertyhelper.py index c382c83..cc987ec 100644 --- a/gobject/propertyhelper.py +++ b/gobject/propertyhelper.py @@ -203,9 +203,7 @@ class property(object): def _check_default(self): ptype = self.type default = self.default - if (ptype == TYPE_BOOLEAN and - (default is not True or - default is not False)): + if (ptype == TYPE_BOOLEAN and (default not in (True, False))): raise TypeError( "default must be True or False, not %r" % (default,)) elif ptype == TYPE_PYOBJECT: |
