Assign ips first.

This was broken on Windows since ips was referenced in the return
but was never created
Merge pull request #4189 from UtahDave/fix_core.py

Assign ips first.