Fix adding client IPs to the database failing on Python 3.