How about 
```
elif platform == 'darwin' or platform == 'linux'
       cur_platform = platform
```
?