I'm not sure if we always expect the file to exist.  If we do, you shouldn't catch the error; otherwise, you should only try:except around the open command (and probably only catch an OSError).

Otherwise, as a oneliner, I'd write
```
if match:
  content += "".join(match.groups())
```