Skip to content

Commit

Permalink
* S3/Config.py: Hide access key and secret key
Browse files Browse the repository at this point in the history
	  from debug output.



git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@96 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information
mludvig committed Feb 28, 2007
1 parent 3968898 commit c72a850
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog
@@ -1,5 +1,7 @@
2007-02-28 Michal Ludvig <michal@logix.cz>

* S3/Config.py: Hide access key and secret key
from debug output.
* S3/S3.py: Modify S3Error exception to work
in python 2.4 (=> don't expect Exception is
a new-style class).
Expand Down
6 changes: 5 additions & 1 deletion S3/Config.py
Expand Up @@ -108,8 +108,12 @@ def parse_file(self, file, sections = []):
data = is_data.groupdict()
if r_quotes.match(data["value"]):
data["value"] = data["value"][1:-1]
debug("ConfigParser: %s->%s" % (data["key"], data["value"]))
self.__setitem__(data["key"], data["value"])
if data["key"] in ("access_key", "secret_key"):
print_value = (data["value"][:3]+"...%d_chars..."+data["value"][-2:]) % (len(data["value"]) - 4)
else:
print_value = data["value"]
debug("ConfigParser: %s->%s" % (data["key"], print_value))
continue
warning("Ignoring invalid line in '%s': %s" % (file, line))

Expand Down

0 comments on commit c72a850

Please sign in to comment.