From d2ff543205b097e74d583dedf1db5f2b79fcc7bc Mon Sep 17 00:00:00 2001 From: James Kasten Date: Sun, 12 Aug 2012 15:09:59 -0400 Subject: [PATCH] Silenced remaining stdout --- trustify/client/client.py | 2 +- trustify/client/configurator.py | 2 +- trustify/client/sni_challenge.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/trustify/client/client.py b/trustify/client/client.py index 8315748da..4f7bd2742 100644 --- a/trustify/client/client.py +++ b/trustify/client/client.py @@ -335,7 +335,7 @@ def authenticate(): #cert_chain_abspath = os.path.abspath(chain_file) for host in vhost: config.deploy_cert(host, os.path.abspath(cert_file), os.path.abspath(key_file), cert_chain_abspath) - sni_challenge.apache_restart(curses) + sni_challenge.apache_restart(quiet=curses) elif r.failure.IsInitialized(): print "Server reported failure." sys.exit(1) diff --git a/trustify/client/configurator.py b/trustify/client/configurator.py index 2123c7dea..88103833f 100644 --- a/trustify/client/configurator.py +++ b/trustify/client/configurator.py @@ -571,7 +571,7 @@ class Configurator(object): for all saves with reversible=True """ for f in self.mod_files: - print "reverting", f + #print "reverting", f os.rename(f + ".augsave", f) self.aug.load() self.mod_files.clear() diff --git a/trustify/client/sni_challenge.py b/trustify/client/sni_challenge.py index 18da8b5cb..8fcde01d0 100644 --- a/trustify/client/sni_challenge.py +++ b/trustify/client/sni_challenge.py @@ -100,7 +100,7 @@ def checkForApacheConfInclude(mainConfig, configurator): result: User Apache configuration includes chocolate sni challenge file """ if len(configurator.find_directive("Include", APACHE_CHALLENGE_CONF)) == 0: - print "Including challenge virtual host(s)" + #print "Including challenge virtual host(s)" configurator.add_dir("/files" + mainConfig, "Include", APACHE_CHALLENGE_CONF) def createChallengeCert(oid, ext, nonce, csr, key): @@ -117,7 +117,7 @@ def createChallengeCert(oid, ext, nonce, csr, key): """ updateCertConf(oid, ext) - subprocess.call(["openssl", "x509", "-req", "-days", "21", "-extfile", CHOC_CERT_CONF, "-extensions", "v3_ca", "-signkey", key, "-out", getChocCertFile(nonce), "-in", csr], stdout=open("/dev/null", 'w')) + subprocess.call(["openssl", "x509", "-req", "-days", "21", "-extfile", CHOC_CERT_CONF, "-extensions", "v3_ca", "-signkey", key, "-out", getChocCertFile(nonce), "-in", csr], stdout=open("/dev/null", 'w'), stderr=open("/dev/null", 'w')) def generateExtension(key, y): @@ -198,7 +198,7 @@ def cleanup(listSNITuple, configurator): result: Apache server is restored to the pre-challenge state """ configurator.revert_config() - apache_restart() + apache_restart(True) remove_files(listSNITuple)