Fixing strange 'no valid baseurl' error

For some reason my yum updates on FC5 started failing with a strange error message: no valid baseurl for: core. After looking around a bit I found the problem. It looks like the following files in /etc/yum.repos.d had a commented out 'baseurl' line:
  • fedora-core.repos
  • fedora-updates.repos
  • fedora-extras.repos
I removed the comments on those lines (they are near the top of the files), and everything worked fine. I didn't change the files, so maybe it was a strange yum update that messed them up? Weird.