The code you posted will disable the headlight. Do you have any other real time lights added in your script?
To prevent real time lights from affecting the model you can either
- check the 'turn off lighting' option in the OSG exporter
- disable lighting on the model through the script