summaryrefslogtreecommitdiff
path: root/rsa/cli.py
diff options
context:
space:
mode:
authorSybren A. St?vel <sybren@stuvel.eu>2011-08-03 13:31:47 +0200
committerSybren A. St?vel <sybren@stuvel.eu>2011-08-03 13:31:47 +0200
commit27673f005e64071b1464c89f4aaeb2b2db8848fe (patch)
treeb600250a97a46c34ad330af84e04fe5f1d34851a /rsa/cli.py
parent23aef04b174b624cc962cf47a211367a382638aa (diff)
downloadrsa-27673f005e64071b1464c89f4aaeb2b2db8848fe.tar.gz
More consistent options for pyrsa-keygen
Diffstat (limited to 'rsa/cli.py')
-rw-r--r--rsa/cli.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/rsa/cli.py b/rsa/cli.py
index b4b8f57..91fe0d7 100644
--- a/rsa/cli.py
+++ b/rsa/cli.py
@@ -41,7 +41,7 @@ def keygen():
'not saved if this option is not present. You can use '
'pyrsa-priv2pub to create the public key file later.')
- parser.add_option('--privout', type='string',
+ parser.add_option('--out', type='string',
help='Output filename for the private key. The key is '
'written to stdout if this option is not present.')
@@ -76,9 +76,9 @@ def keygen():
# Save private key
data = priv_key.save_pkcs1(format=cli.form)
- if cli.privout:
- print >>sys.stderr, 'Writing private key to %s' % cli.privout
- with open(cli.privout, 'w') as outfile:
+ if cli.out:
+ print >>sys.stderr, 'Writing private key to %s' % cli.out
+ with open(cli.out, 'w') as outfile:
outfile.write(data)
else:
print >>sys.stderr, 'Writing private key to stdout'