If you depress the pedal and keep it depressed before opening the line, nothing will leak out. It's basically moved the piston to a position where brake fluid from the master cylinder is being blocked. It's like filling a straw or hose with water and capping off one end with your hand. The liquid won't come out until you remove your hand. No harm in keeping it depressed while doing the brake line swap. It's quick, easy, and almost zero mess.
__________________________________________________ _____
2005 BMW 330Ci ZHP Jet Black/Black with aluminum cube
Bone stock at the moment