web.database fails when password contains parens
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
web.py |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I connect with something like:
db = web.database(
then, when trying to query the database:
db.query("SELECT * FROM FOO")
I get an exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/
db_cursor = self._db_cursor()
File "/Library/
return self.ctx.
File "/Library/
self.
File "/Library/
ctx.db = self._connect(
File "/Library/
return self.db_
File "build/
File "build/
_mysql_
Changing my password fixes the problem, so I assume it doesn't like something in there (probably the parens).
Works for me.
>>> import web dbn="mysql" , db="test", user="anand", pw="*()")
>>> db = web.database(
>>> db.query("SELECT * FROM test").list()
0.0 (1): SELECT * FROM test
[]