Sadly, this won't work, as CalledProcessError does not have this attribute.