bugfixes, cleanups

This commit is contained in:
Peter Eckersley 2016-02-17 12:13:28 -08:00
parent 8f5b8558d2
commit 3aeb62cf7e
2 changed files with 6 additions and 3 deletions

View file

@ -269,7 +269,8 @@ class PostfixConfigGenerator(MTAConfigGenerator):
def usage():
print "Usage: MTAConfigGenerator starttls-everywhere.json /etc/postfix /etc/letsencrypt/live/example.com/"
print ("Usage: %s starttls-everywhere.json /etc/postfix /etc/letsencrypt/live/example.com/" %
sys.argv[0])
sys.exit(1)
if __name__ == "__main__":
@ -280,8 +281,9 @@ if __name__ == "__main__":
c.load_from_json_file(sys.argv[1])
postfix_dir = sys.argv[2]
le_lineage = sys.argv[3]
pieces = [os.path.join(le_lineage, f) for f in ("cert.pem", "privkey.pem", "chain.pem", "fullchain.pem")]
if not os.isdir(le_lineage) or not all(os.isfile(p) for p in pieces) :
pieces = [os.path.join(le_lineage, f) for f in (
"cert.pem", "privkey.pem", "chain.pem", "fullchain.pem")]
if not os.path.isdir(le_lineage) or not all(os.path.isfile(p) for p in pieces) :
print "Let's Encrypt directory", le_lineage, "does not appear to contain a valid lineage"
print
usage()

View file

@ -1,3 +1,4 @@
dnspython
publicsuffix
m2crypto
dateutils