diff options
author | Richard Darst <rkd@zgib.net> | 2009-07-01 03:30:31 (GMT) |
---|---|---|
committer | Richard Darst <rkd@zgib.net> | 2009-07-01 03:30:31 (GMT) |
commit | 8b87980586c4dfa331452e35c8196e191af098df (patch) | |
tree | c0d6daf03590e2328d91f04264c9eea04ae610e7 /items.py | |
parent | c2c99deb617d9d1940cb2bf7b9fb6d0c84a8309f (diff) |
change to not use isinstance() in determing types
- reload() of modules messed this up greatly, in certain cases. Modules
get re-executed when you reload(), which causes the classes to be
redefined, meaning that the classes stored in the Meeting object are
*not* any longer subclasses of items.*
- With the other fixes I did, this was only going to be a problem if
supybot reloaded the MeetBot module during a meeting, however, it's best
to plan for that anyway.
- I switch to comparing m.itemtype to a string value. Not as elegant,
but works for now.
darcs-hash:20090701033031-82ea9-cf69f235e06d70dd70265f5c5481e4c8262ec971.gz
Diffstat (limited to 'items.py')
-rw-r--r-- | items.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -28,6 +28,7 @@ def inbase(i, chars='abcdefghijklmnopqrstuvwxyz', place=0): # they exist to aid in HTML-formatting. # class _BaseItem(object): + itemtype = None def get_replacements(self): replacements = { } for name in dir(self): |