s3tools/s3cmd — pull request #221 by yuryu (2013-09-05 03:52:19+00:00)
Title: * S3/Config.py : Get user input aws access key, secret and gpg passphrase out of debug format string.

If '%' character is included in any of access_key, secret_key or gpg_passphrase, the following error occurs:

```
Invoked as: ./s3cmdProblem: ValueError: unsupported format character 'Y' (0x59) at index 1
S3cmd: 1.5.0-alpha3

Traceback (most recent call last):
File "./s3cmd", line 2180, in
main()
File "./s3cmd", line 1938, in main
cfg = Config(options.config)
File "/home/yuryu/s3cmd/S3/Config.py", line 117, in __init__
self.read_config_file(configfile)
File "/home/yuryu/s3cmd/S3/Config.py", line 203, in read_config_file
cp = ConfigParser(configfile)
File "/home/yuryu/s3cmd/S3/Config.py", line 249, in __init__
self.parse_file(file, sections)
File "/home/yuryu/s3cmd/S3/Config.py", line 277, in parse_file
print_value = (data["value"][:2]+"...%d_chars..."+data["value"][-1:]) % (len(data["value"]) - 3)
ValueError: unsupported format character 'Y' (0x59) at index 1
```

This patch fixes this issue.