Mercurial > code > home > repos > homeauto
view service/arduinoNode/pushConfig.py @ 1562:c2ed44ed1e3c dependabot/pip/service/collector/twisted-19.7.0
Bump twisted from 19.2.0 to 19.7.0 in /service/collector
Bumps [twisted](https://github.com/twisted/twisted) from 19.2.0 to 19.7.0.
- [Release notes](https://github.com/twisted/twisted/releases)
- [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst)
- [Commits](https://github.com/twisted/twisted/compare/twisted-19.2.0...twisted-19.7.0)
Signed-off-by: dependabot[bot] <support@github.com>
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
---|---|
date | Fri, 14 Feb 2020 10:01:26 +0000 |
parents | c3c2418d138c |
children | 6b80a6c58907 |
line wrap: on
line source
from __future__ import division import sys import etcd3 from twisted.python.filepath import FilePath etcd = etcd3.client(host='bang', port=9022) prefix, = sys.argv[1:] def main(): existing = set(md.key for v, md in etcd.get_prefix(prefix)) written = set() root = FilePath('config') print 'reading at %s' % root for f in root.walk(): if f.isfile() and f.path.endswith('.n3'): n3 = f.getContent() key = prefix + b'/'.join(f.segmentsFrom(root)) etcd.put(key, n3) written.add(key) print 'wrote %s' % key for k in existing - written: etcd.delete(k) print 'removed %s' % k main()