From 015ea384dafbc17070d3c11e84004ca27b866eb9 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 10 Feb 2014 01:57:26 +0000 Subject: [PATCH] Fix reload to use a copy of datafile keys * lib/mudpy/misc.py: Python 2.x was more tolerant of this and it now breaks under 3.4 release candidates, but correcting it to iterate over a copy is arguably more correct anyway. --- lib/mudpy/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mudpy/misc.py b/lib/mudpy/misc.py index a463653..d78eac6 100644 --- a/lib/mudpy/misc.py +++ b/lib/mudpy/misc.py @@ -85,7 +85,7 @@ class Element: def reload(self): """Create a new element and replace this one.""" - new_element = Element(self.key, self.universe, self.origin.filename) + Element(self.key, self.universe, self.origin.filename) del(self) def destroy(self): @@ -462,7 +462,7 @@ class Universe: # clear out all read-only files if hasattr(self, "files"): - for data_filename in self.files.keys(): + for data_filename in list(self.files.keys()): if not self.files[data_filename].is_writeable(): del self.files[data_filename] -- 2.11.0