Cleaned up per Kuba.

This commit is contained in:
Adam Woodbeck 2014-11-27 08:39:32 -05:00
parent da29a92729
commit bcb788fe0b

View file

@ -28,10 +28,10 @@ def main():
nargs="+")
parser.add_argument("-s", "--server", dest="server",
help="The ACME CA server address.")
parser.add_argument("-p", "--privkey", dest="privkey", type=str,
parser.add_argument("-p", "--privkey", dest="privkey",
help="Path to the private key file for certificate "
"generation.")
parser.add_argument("-c", "--csr", dest="csr", type=str,
parser.add_argument("-c", "--csr", dest="csr",
help="Path to the certificate signing request file "
"corresponding to the private key file. The "
"private key file argument is required if this "
@ -63,11 +63,6 @@ def main():
args = parser.parse_args()
# Make sure each given file is readable.
for f in (args.privkey, args.csr):
if f and not os.access(f, os.R_OK):
parser.error("the file '{}' is not readable.".format(f))
# Enforce '--privkey' is set along with '--csr'.
if args.csr and not args.privkey:
parser.error("private key file (--privkey) must be specified along{} "