diff options
author | Marko Kreen | 2011-12-07 10:13:11 +0000 |
---|---|---|
committer | Marko Kreen | 2011-12-07 10:13:11 +0000 |
commit | 7f8aff741f196edb3f08f52690cc12f635e4525a (patch) | |
tree | 8a931950c28e3b4880b6b9913e95a4adfb7f0e5c /python/skytools/scripting.py | |
parent | 1621311b66c33749caafc6b0291412c6b4d376a3 (diff) | |
parent | 5e8f9a2d3d3ab47e4343dd9227925a6d48f2dcdc (diff) |
Merge branch 'master' of git://github.com/markokr/skytools
Diffstat (limited to 'python/skytools/scripting.py')
-rw-r--r-- | python/skytools/scripting.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/skytools/scripting.py b/python/skytools/scripting.py index 583c6464..b1154741 100644 --- a/python/skytools/scripting.py +++ b/python/skytools/scripting.py @@ -3,7 +3,7 @@ """ -import sys, os, signal, optparse, time, errno, select +import sys, os, signal, optparse, time, errno, select, re import logging, logging.handlers, logging.config import skytools @@ -720,7 +720,9 @@ class DBScript(BaseScript): else: if not connstr: connstr = self.cf.get(dbname) - self.log.debug("Connect '%s' to '%s'" % (cache, connstr)) + # connstr might contain password, it is not a good idea to log it + filtered_connstr = re.sub(' password=\S+', ' password=***HIDDEN***', connstr) + self.log.debug("Connect '%s' to '%s'" % (cache, filtered_connstr)) dbc = DBCachedConn(cache, connstr, params['max_age'], setup_func = self.connection_hook) self.db_cache[cache] = dbc |