[sorrows-mudlib] r207 committed - livecoding/namespace.py: Detection of dumplicate namespace contributio...

0 views
Skip to first unread message

sorrows...@googlecode.com

unread,
Jan 20, 2012, 9:47:53 PM1/20/12
to sorrows-mud...@googlegroups.com
Revision: 207
Author: richard.m.tew
Date: Fri Jan 20 18:46:59 2012
Log: livecoding/namespace.py: Detection of dumplicate namespace
contributions no longer errors when the object lacks a '__file__' attribute.
http://code.google.com/p/sorrows-mudlib/source/detail?r=207

Modified:
/trunk/contrib/livecoding/namespace.py

=======================================
--- /trunk/contrib/livecoding/namespace.py Fri Jan 7 05:23:18 2011
+++ /trunk/contrib/livecoding/namespace.py Fri Jan 20 18:46:59 2012
@@ -412,7 +412,7 @@

# By default we never overwrite. This way we can identify
duplicate contributions.
if hasattr(namespace, k) and k not in overwritableAttributes
and k != "__doc__":
- logger.error("Duplicate namespace contribution for '%s.%s'
from '%s', our class = %s", moduleName, k, scriptFile.filePath, v.__file__
== scriptFile.filePath)
+ logger.error("Duplicate namespace contribution for '%s.%s'
from '%s', our class = %s", moduleName, k, scriptFile.filePath,
getattr(v, "__file__", "???") == scriptFile.filePath)
continue

if valueType in (types.ClassType, types.TypeType):

Reply all
Reply to author
Forward
0 new messages