That statement is false.
The Maaginot line was indeed built to protect the French from German's military attack..But in 1940, The line was proven to be inefective after it was completely emasculated by the German troops using the blitzkrieg tactics..