Mercurial > nagslang
changeset 328:14339d2d46bc
Only add objects with actual puzzlers to the glue
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Fri, 06 Sep 2013 02:29:44 +0200 |
parents | fdda26d1f672 |
children | 6376730611f4 |
files | nagslang/puzzle.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/nagslang/puzzle.py Fri Sep 06 02:21:01 2013 +0200 +++ b/nagslang/puzzle.py Fri Sep 06 02:29:44 2013 +0200 @@ -18,6 +18,11 @@ def add_component(self, name, puzzler): if not isinstance(puzzler, Puzzler): puzzler = puzzler.puzzler + if puzzler is None: + # We've got a name, but no puzzler, + # so we shouldn't actually be stuck + # in here + return self._components[name] = puzzler puzzler.set_glue(self)