Browse Source

fix for nameless functors

David Rose 14 years ago
parent
commit
d6a8731988
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/interval/FunctionInterval.py

+ 1 - 1
direct/src/interval/FunctionInterval.py

@@ -77,7 +77,7 @@ class FunctionInterval(Interval.Interval):
 
     @staticmethod
     def makeUniqueName(func, suffix = ''):
-        name = 'Func-%s-%d' % (func.__name__, FunctionInterval.functionIntervalNum)
+        name = 'Func-%s-%d' % (getattr(func, '__name__', str(func)), FunctionInterval.functionIntervalNum)
         FunctionInterval.functionIntervalNum += 1
         if suffix:
             name = '%s-%s' % (name, str(suffix))