Use getattr to take the src_pathname value or ''

Avoid the AttributeError that can hide other attrs too