Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

improved last change to left definitively there

olveyra3f7100fe1ec0
diff --git a/scrapy/trunk/scrapy/utils/db.py b/scrapy/trunk/scrapy/utils/db.py
index e36c15143..fc3e544a5 100644
--- a/scrapy/trunk/scrapy/utils/db.py
+++ b/scrapy/trunk/scrapy/utils/db.py
@@ -21,5 +21,11 @@ def mysql_connect(db_uri, **kwargs):
d.update(settings.get("MYSQL_CONNECTION_SETTINGS"))
d.update(kwargs)
- log.msg("Connecting db with settings %s" % d )
+
+ dcopy = d.copy()
+ print dcopy
+ if dcopy.get("passwd"):
+ dcopy["passwd"] = "********"
+ log.msg("Connecting db with settings %s" % dcopy )
+
return MySQLdb.connect(**d)