This will never be None; the above call will assemble some sort of string, even if it's invalid. I'm thinking the intention here was to move this check up and have it against prestodelta_rel_path instead of prestodelta_path.