exclude rat/ in upgrade.py