Mercurial > templog
comparison web/log.py @ 211:59379b2bd056
key fingerprints are case- and whitespace-insensitive.
add some comments
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 26 Jun 2014 23:02:23 +0800 |
parents | 3f403e22c2e3 |
children | efb5cad2e98b |
comparison
equal
deleted
inserted
replaced
210:3f403e22c2e3 | 211:59379b2bd056 |
---|---|
326 | 326 |
327 return json.dumps(r, sort_keys=True, indent=4) | 327 return json.dumps(r, sort_keys=True, indent=4) |
328 | 328 |
329 def send_params(params): | 329 def send_params(params): |
330 # 'templog_receive' is ignored due to authorized_keys | 330 # 'templog_receive' is ignored due to authorized_keys |
331 # restrictions | 331 # restrictions. the rpi has authorized_keys with |
332 # command="/home/matt/templog/venv/bin/python /home/matt/templog/py/receive.py",no-pty,no-port-forwarding,no-x11-forwarding,no-agent-forwarding ssh-rsa AAAAB3NzaC.... | |
332 args = [config.SSH_PROG, '-i', config.SSH_KEYFILE, | 333 args = [config.SSH_PROG, '-i', config.SSH_KEYFILE, |
333 config.SSH_HOST, 'templog_receive'] | 334 config.SSH_HOST, 'templog_receive'] |
334 try: | 335 try: |
335 p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE) | 336 p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE) |
336 (out, err) = p.communicate(json.dumps(params)) | 337 (out, err) = p.communicate(json.dumps(params)) |