jdiazbb / rfxcmd

Automatically exported from code.google.com/p/rfxcmd
1 stars 0 forks source link

MySQL Error for 0x54 Sensors #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

On version 0.1j-beta

$ rfxcmd.py --device=/dev/rfxcom --config=config.xml --mysql
Traceback (most recent call last):
  File "/home/p2p/RFXCom/rfxcmd.py", line 1692, in <module>
    rawcmd = read_rfx()
  File "/home/p2p/RFXCom/rfxcmd.py", line 1130, in read_rfx
    decodePacket( message )
  File "/home/p2p/RFXCom/rfxcmd.py", line 874, in decodePacket
    db = MySQLdb.connect(mysql_server, mysql_username, mysql_password, mysql_database)
NameError: global name 'mysql_server' is not defined

This error appears when a packet type 0x54 is received and MySQL option is 
enabled.

It seems that variables names have not been changed to comply with the new 
config file.

Attached patch fixes the issue.

Original issue reported on code.google.com by jbbod...@gmail.com on 13 Oct 2012 at 12:13

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you. I have fixed the MySQL statement in the rfxcmd v0.1k

Original comment by sebastia...@gmail.com on 14 Oct 2012 at 11:53