Changeset - d050b8efda9d
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 20 months ago 2023-06-02 01:42:36
drewp@bigasterisk.com
fix bug with uninitialized effect ,and prefer a dead effect over a graph reload
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/effect/effecteval2.py
Show inline comments
 
import traceback
 
import inspect
 
import logging
 
from dataclasses import dataclass
 
@@ -38,7 +39,7 @@ class EffectEval2:
 
        self.graph.addHandler(self._compile)
 

	
 
    def _compile(self):
 
        self.effectFunction = None
 
        self.config = None
 
        if not self.graph.contains((self.uri, RDF.type, L9['Effect'])):
 
            return
 

	
 
@@ -75,7 +76,7 @@ class EffectEval2:
 
            self.config = Config(effectFunction, esettings, devSettings, func, funcArgs)
 
        except Exception:
 
            log.error(f"while compiling {self.uri}")
 
            raise
 
            traceback.print_exc()
 

	
 
    def compute(self, songTime: float, inputs: EffectSettings) -> DeviceSettings:
 
        """
0 comments (0 inline, 0 general)