Mercurial > code > home > repos > homeauto
diff service/arduinoNode/arduinoNode.py @ 214:254d656af72e
support a dir of config files
Ignore-this: 729d0aea065af5a0fac6b07653b1d3d2
author | drewp@bigasterisk.com |
---|---|
date | Sun, 03 Jan 2016 02:27:17 -0800 |
parents | 9c8674329a13 |
children | f8ffb9d8d982 |
line wrap: on
line diff
--- a/service/arduinoNode/arduinoNode.py Sun Jan 03 02:24:27 2016 -0800 +++ b/service/arduinoNode/arduinoNode.py Sun Jan 03 02:27:17 2016 -0800 @@ -40,7 +40,9 @@ def __init__(self): self.graph = Graph() log.info('read config') - self.graph.parse('config.n3', format='n3') + for f in os.listdir('config'): + if f.startswith('.'): continue + self.graph.parse('config/%s' % f, format='n3') self.graph.bind('', ROOM) # not working self.graph.bind('rdf', RDF)