[Checkins] SVN: Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/objectinfo.py Just tell if we cannot get the name of an object from itself.
Uli Fouquet
uli at gnufix.de
Sat Feb 27 12:14:32 EST 2010
Log message for revision 109482:
Just tell if we cannot get the name of an object from itself.
Changed:
U Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/objectinfo.py
-=-
Modified: Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/objectinfo.py
===================================================================
--- Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/objectinfo.py 2010-02-27 03:54:47 UTC (rev 109481)
+++ Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/objectinfo.py 2010-02-27 17:14:32 UTC (rev 109482)
@@ -19,11 +19,14 @@
self._name = None
self._parent_oid = None
+
@property
def name(self):
"""Get name of wrapped obj.
"""
- return getattr(self.obj, '__name__', str(self._name))
+ if self._name is not None:
+ return self._name
+ return getattr(self.obj, '__name__', u'???')
def getOID(self):
try:
More information about the checkins
mailing list