Metaswitch/crest — pull request #8 by mirw (2013-06-04 19:57:37+00:00)
Title: [Reviewer: Andy] Clean install output

Andy, please can you review my fix to get a clean install of crest? Previously, we sometimes got the following (benign) error.

```
Setting up clearwater-infrastructure (1.0-130507.080417) ...
mv: cannot move `/tmp/local_settings.py.9390' to `/usr/share/clearwater/homer/env/lib/python2.7/site-packages/crest-0.1-py2.7.egg/metaswitch/crest/local_settings.py': No such file or directory
```

This was because we hadn't yet installed homer, and so hadn't unpacked its egg, so the directory didn't exist. The key point of my fix is to check that files (and hence their parent directories) exist before copying - if they don't, it's safe not to do the copy, because it will get fixed up later anyway. The rest of the change (moving to the for loop) is just to make the code tidier.