InvisibleEngineer/FreeDNS-Updater — pull request #1 by pearsw (2012-04-22 13:39:18+00:00)
Title: A couple of changes

Hi there,

I just tried your package via the AUR and at first I had this error:

Traceback (most recent call last):
File "/usr/bin/freedns.py", line 48, in
msg("Got external IP " + external_ip)
TypeError: Can't convert 'bytes' object to str implicitly

After a quick google (I'm fairly new to Python!) I found the `.decode([encoding], [errors])` method which could be used to convert from 'bytes' to a string.

The easy option seemed to be to change `external_ip` in line 47 to `external_ip.decode('utf-8')` but I wasn't sure why the IP adress wouldn't be stored in plain text to begin with -- hence the changes I made.

Less critical, but I also changed the `update_url` to a more public option: http://automation.whatismyip.com/n09230945.asp. Maybe some redundancy would be useful here too? (i.e. a backup option if the primary URL times out.)

Tested on Arch Linux and OSX (python script only).

Other than that, both the original script and the changes you've made are awesome; Thanks for uploading it to the AUR and I hope my changes are of some use!

Best regards,

Will Pearson