Просмотр исходного кода

transformations no longer crash when stepping through them

Simon Van Mierlo 9 лет назад
Родитель
Сommit
e9de86f3d5
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      mt/ptcal/ptcal.py

+ 2 - 0
mt/ptcal/ptcal.py

@@ -988,6 +988,8 @@ class PyTCoreAbstractionLayer :
         NOTE: this function assumes that feedback for the last step has already
                 been received '''
     def step(self) :
+        if not hasattr(self, 'start_time'):         
+            self.start_time = clock()
         if self._execmode == 'PLAY' :
             pass
         else :