浏览代码

*** empty log message ***

Joe Shochet 25 年之前
父节点
当前提交
1fbddc9f80
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      direct/src/ffi/FFIExternalObject.py

+ 4 - 5
direct/src/ffi/FFIExternalObject.py

@@ -174,14 +174,13 @@ class FFIExternalObject:
         # Lots of Panda classes have an output function defined that takes an Ostream
         # We create a LineStream for the output function to write to, then we extract
         # the string out of it and return it as our str
-        baseRepr = ''
-        import LineStream
-        lineStream = LineStream.LineStream()
         try:
+            import LineStream
+            lineStream = LineStream.LineStream()
             self.output(lineStream)
-            baseRepr = baseRepr + lineStream.getLine()
+            baseRepr = lineStream.getLine()
         except:
-            pass
+            baseRepr = ('[' + self.__class__.__name__ + ' at: ' + `self.this` + ']')
         # In any case, return the baseRepr
         return baseRepr