Message ID | 20110919215711.22328.43108.launchpad@ackee.canonical.com |
---|---|
State | Accepted |
Headers | show |
=== modified file 'lava_dispatcher/utils.py' --- lava_dispatcher/utils.py 2011-09-15 07:02:08 +0000 +++ lava_dispatcher/utils.py 2011-09-19 06:15:01 +0000 @@ -53,7 +53,9 @@ else: file_location = download(url, path) try: - os.makedirs(os.path.dirname(cache_loc)) + cache_dir = os.path.dirname(cache_loc) + if not os.path.exists(cache_dir): + os.makedirs(cache_dir) os.link(file_location, cache_loc) except OSError, err: #errno 18 is Invalid cross-device link