Not to use "global" keyword in protect.py

It's against python guidelines and makes error in pyflakes

Change-Id: I6440f95d3a7bb13fdf99c5c675025d7dba27db09
Merge "Not to use "global" keyword in protect.py"