[livecoding] r144 committed - -reloader.py: When a file was changed, new classes were not actually p...

4 views
Skip to first unread message

livec...@googlecode.com

unread,
Mar 19, 2010, 3:44:18 AM3/19/10
to py-livecod...@googlegroups.com
Revision: 144
Author: richard.m.tew
Date: Fri Mar 19 00:43:01 2010
Log: -reloader.py: When a file was changed, new classes were not actually
put on the namespace. This meant that when the file was changed again,
this would cause an error due to it mismatching with other state.
http://code.google.com/p/livecoding/source/detail?r=144

Modified:
/trunk/reloader.py

=======================================
--- /trunk/reloader.py Fri Mar 19 00:29:58 2010
+++ /trunk/reloader.py Fri Mar 19 00:43:01 2010
@@ -8,7 +8,7 @@
import time

logger = logging.getLogger("reloader")
-#logger.setLevel(logging.DEBUG)
+# logger.setLevel(logging.DEBUG)

# TODO: rename 'namespace.py' to 'namespaces.py' ... need to think about
it...
import namespace as namespaces
@@ -292,7 +292,8 @@
self.UpdateClass(scriptFile, oldValue, newValue, globals_)

# If there was an old value, it is updated.
- if oldValue is not None:
+ if oldValue and oldValue is not NonExistentValue:
+ logger.debug("Encountered existing class '%s' %s",
attrName, oldValue)
namespaceContributions.add(attrName)
continue

Reply all
Reply to author
Forward
0 new messages