BrightcoveOS/Diamond — pull request #15 by nareshov (2012-01-09 11:10:25+00:00)
Title: filter out unknown parameters that gets sent to MySQLdb.connect()

[2012-01-09 11:00:39,172] [Thread-1] byte_unit => byte
[2012-01-09 11:00:39,172] [Thread-1] passwd => yourpassword
[2012-01-09 11:00:39,172] [Thread-1] db => database1
[2012-01-09 11:00:39,172] [Thread-1] enabled => True
[2012-01-09 11:00:39,172] [Thread-1] port => 3306
[2012-01-09 11:00:39,172] [Thread-1] host => localhost
[2012-01-09 11:00:39,173] [Thread-1] user => root
[2012-01-09 11:00:39,173] [Thread-1] method => Sequential
[2012-01-09 11:00:39,185] [Thread-1] Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/diamond/collector.py", line 163, in _run
self.collect()
File "/usr/share/diamond/collectors/MySQLCollector/MySQLCollector.py", line 35, in collect
stats = self.get_stats()
File "/usr/share/diamond/collectors/MySQLCollector/MySQLCollector.py", line 20, in get_stats
db = MySQLdb.connect(**params)
File "/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
TypeError: 'byte_unit' is an invalid keyword argument for this function

^C