capture_stderr to prevent stderr syslog/console output from ssh-keyscan

This commit is contained in:
Jeff Volkenant
2020-02-21 14:24:55 -08:00
parent 30c2c60f59
commit 3f5dc26be8
+1 -1
View File
@@ -382,7 +382,7 @@ def build_sshfp_records():
except ValueError:
pass
break
keys = shell("check_output", ["ssh-keyscan", "-t", "rsa,dsa,ecdsa,ed25519", "-p", str(port), "localhost"])
keys = shell("check_output", ["ssh-keyscan", "-t", "rsa,dsa,ecdsa,ed25519", "-p", str(port), "localhost"], capture_stderr=True)
for key in sorted(keys.split("\n")):
if key.strip() == "" or key[0] == "#": continue
try: