Could you change this to check that it contains "name=foo" instead of matching on the entire repr string?