wohaph / keyczar

Automatically exported from code.google.com/p/keyczar
0 stars 0 forks source link

Python string formatting error #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate key size < default size
$ python2.4 keyczart.py addkey --location=/tmp/test-rsa --size=1024
Traceback (most recent call last):
  File "keyczart.py", line 306, in ?
    sys.exit(main(sys.argv[1:]))  # sys.argv[0] is name of program
  File "keyczart.py", line 291, in main
    AddKey(loc, status, crypter, size)
  File "keyczart.py", line 124, in AddKey
    czar.AddVersion(status, size)
  File "/home/ookoi/Bureau/tmp/python/src/keyczar/keyczar.py", line 178, in
AddVersion
    print("WARNING: %d-bit key size is less than recommended default key" +
TypeError: not all arguments converted during string formatting

What is the expected output? What do you see instead?

$ python2.4 keyczart.py addkey --location=/tmp/test-rsa --size=1024
WARNING: 1024-bit key size is less than recommended default key size of
2048 bits for RSA_PRIV keys.

What version of the product are you using? On what operating system?

Current Python trunk

Please provide any additional information below.

Attached trivial patch.

Original issue reported on code.google.com by sebastien.martini on 4 Feb 2009 at 3:49

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in rev. 416.

Original comment by sebastien.martini on 4 Jun 2009 at 11:40