Python dns fix

Not wanting to step on anyone's toes, but this should be fixed.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>