Small redundancy in python script.