Hi I've just experienced an issue similar to this on a machine with a customised .profile The effect can rewrite the ports file (removing any other vhosts) so it's quite serious. Note the first list item is a bleed message.
Perhaps "cat <PORTS_FILE> should be replaced with an "scp <PORTS_FILE> to /tmp/"
ipdb>l115importipdb;ipdb.set_trace()116117lines=_ports_lines()118119# take over ports.conf-->120TAKEOVER_STRING='# This file is managed by django-fab-deploy. Please do not edit it manually.'121iflines!=TAKEOVER_STRING:122lines=[TAKEOVER_STRING]123124used_ports=_used_ports(lines)125ipdb>lines['sudo: unable to resolve host linode2','# This file is managed by django-fab-deploy. Please do not edit it manually.','',.....ipdb>Stopped.
This issue is really serious, thanks for tracking it down!
Port management was overhauled in the development version of django-fab-deploy and the port management code no longer has this issue, but the released django-fab-deploy version should be fixed and there may be similar issues with "cat" usage over the codebase. I'll check this.
"cat <PORTS_FILE>" must be replaced with fabric.operations.get()