Resolution.exec doesn't return an array, so I split it into one. This makes the rest of the code work. Also, there were some seemingly copy-paste errors for hostint_dns.
Not sure if newer nmcli is different, or earlier code didn't work. Either way, fixed syntax to work on EL7 and FC19+