comparison service/arduinoNode/pushConfig.py @ 343:13b2a61650c1

fix pushconfig Ignore-this: 36fd12eb507fbe027b9a00dbd78f13af
author drewp@bigasterisk.com
date Sat, 14 Apr 2018 23:46:54 -0700
parents bb80182195c0
children 12f9f1838fb5
comparison
equal deleted inserted replaced
342:7da683137970 343:13b2a61650c1
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'):