diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-23 22:05:53 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-23 22:05:53 (GMT) |
commit | 7cb016db80e5e1fc13fece5572e6b1e5b9f83903 (patch) | |
tree | fa0f11471aa7b5ce06c4366cf624911227a540df /Mac | |
parent | 51f8d38185782385c08eaac50bdff1ea46a2f660 (diff) | |
download | cpython-7cb016db80e5e1fc13fece5572e6b1e5b9f83903.zip cpython-7cb016db80e5e1fc13fece5572e6b1e5b9f83903.tar.gz cpython-7cb016db80e5e1fc13fece5572e6b1e5b9f83903.tar.bz2 |
Not all objects have an _propdict and _privpropdict, so cater for that.
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/scripts/gensuitemodule.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Mac/scripts/gensuitemodule.py b/Mac/scripts/gensuitemodule.py index 50dd207..a871942 100644 --- a/Mac/scripts/gensuitemodule.py +++ b/Mac/scripts/gensuitemodule.py @@ -387,7 +387,7 @@ def compileaete(aete, resinfo, fname, output=None, basepkgname=None, # Generate property dicts and element dicts for all types declared in this module fp.write("\ndef getbaseclasses(v):\n") - fp.write("\tif not v._propdict:\n") + fp.write("\tif not getattr(v, '_propdict', None):\n") fp.write("\t\tv._propdict = {}\n") fp.write("\t\tv._elemdict = {}\n") fp.write("\t\tfor superclassname in getattr(v, '_superclassnames', []):\n") @@ -395,8 +395,8 @@ def compileaete(aete, resinfo, fname, output=None, basepkgname=None, fp.write("\t\t\tgetbaseclasses(superclass)\n") fp.write("\t\t\tv._propdict.update(getattr(superclass, '_propdict', {}))\n") fp.write("\t\t\tv._elemdict.update(getattr(superclass, '_elemdict', {}))\n") - fp.write("\t\tv._propdict.update(v._privpropdict)\n") - fp.write("\t\tv._elemdict.update(v._privelemdict)\n") + fp.write("\t\tv._propdict.update(getattr(v, '_privpropdict', {}))\n") + fp.write("\t\tv._elemdict.update(getattr(v, '_privelemdict', {}))\n") fp.write("\n") fp.write("import StdSuites\n") if allprecompinfo: |