I use a pair of vise grips to clamp off the flexible line as close to the claliper as possible. Put them on before you take line off old caliper; fill new caliper with brake fluid before you screw line into new caliper; release vise grips after line is installed and tightened. Still have to bleed, but almost impossible for air to get above vise grips. BTY, I second the advice to drain and replace brake fluid if it's old - above process only necessary if you decide not to do that.