Mercurial > code > home > repos > homeauto
comparison service/arduinoNode/pushConfig.py @ 1148:8b4eda2cf0bd
fix pushconfig
Ignore-this: 36fd12eb507fbe027b9a00dbd78f13af
darcs-hash:a89764f2ad7791417d7c68d6ba30df92be97fe2c
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Sat, 14 Apr 2018 23:46:54 -0700 |
parents | db955e7943af |
children | 12f9f1838fb5 |
comparison
equal
deleted
inserted
replaced
1147:ef494fe0499f | 1148:8b4eda2cf0bd |
---|---|
1 from __future__ import division | 1 from __future__ import division |
2 | 2 import sys |
3 import etcd3 | 3 import etcd3 |
4 | 4 |
5 from twisted.python.filepath import FilePath | 5 from twisted.python.filepath import FilePath |
6 | 6 |
7 etcd = etcd3.client(host='bang6') | 7 etcd = etcd3.client(host='bang6') |
8 | 8 |
9 prefix, = sys.argv[1:] | |
10 | |
9 def main(): | 11 def main(): |
10 prefix = b'arduino/' | |
11 existing = set(md.key for v, md in etcd.get_prefix(prefix)) | 12 existing = set(md.key for v, md in etcd.get_prefix(prefix)) |
12 written = set() | 13 written = set() |
13 root = FilePath('config') | 14 root = FilePath('config') |
14 for f in root.walk(): | 15 for f in root.walk(): |
15 if f.isfile() and f.path.endswith('.n3'): | 16 if f.isfile() and f.path.endswith('.n3'): |