# HG changeset patch # User drewp@bigasterisk.com # Date 1542270327 28800 # Node ID 980d4cf8857dff2f9ffd4915c7672568f5c0a926 # Parent 194583bd603e2202a9567bada70656a92e50098c fix led strip png file path Ignore-this: 8a2e650f16ef2c87712875a49d3cb52f diff -r 194583bd603e -r 980d4cf8857d lib/devices_shared.py --- a/lib/devices_shared.py Sun Nov 11 23:56:33 2018 -0800 +++ b/lib/devices_shared.py Thu Nov 15 00:25:27 2018 -0800 @@ -20,7 +20,9 @@ def get(self, path, x, y, h): if self.lastImg[0] != path: - self.lastImg = path, imageio.imread('../piNode/config/' + path) # or etcd or http + fp = 'config/' + path + self.lastImg = path, imageio.imread(fp) # or etcd or http + log.debug('read image from %r', fp) img = self.lastImg[1] y = numpy.clip(y, 0, img.shape[0] - 1) @@ -80,8 +82,9 @@ int(self.x.get()), int(self.y.get()), int(self.height.get())) - except IOError: - pass + except IOError as e: + log.warn('getPixelColumn %r', e) + log.debug('current = %r', self.current) def currentStatements(self): return []