not sure if I'm being too pernickerty here, but why not:
```
try:
    self.name = os.path.relpath(file.name)
except:
    self.name = file.name
```