Merge lp:~liuyq0307/lava-dispatcher/fix-853657 into lp:lava-dispatcher

Proposed by Yongqin Liu
Status: Merged
Merged at revision: 115
Proposed branch: lp:~liuyq0307/lava-dispatcher/fix-853657
Merge into: lp:lava-dispatcher
Diff against target: 14 lines (+3/-1)
1 file modified
lava_dispatcher/utils.py (+3/-1)
To merge this branch: bzr merge lp:~liuyq0307/lava-dispatcher/fix-853657
Reviewer Review Type Date Requested Status
Paul Larson (community) Approve
Review via email: mp+75955@code.launchpad.net

Description of the change

fix bug of 853657 that only the first image is cached.

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_dispatcher/utils.py'
2--- lava_dispatcher/utils.py 2011-09-15 07:02:08 +0000
3+++ lava_dispatcher/utils.py 2011-09-19 06:39:24 +0000
4@@ -53,7 +53,9 @@
5 else:
6 file_location = download(url, path)
7 try:
8- os.makedirs(os.path.dirname(cache_loc))
9+ cache_dir = os.path.dirname(cache_loc)
10+ if not os.path.exists(cache_dir):
11+ os.makedirs(cache_dir)
12 os.link(file_location, cache_loc)
13 except OSError, err:
14 #errno 18 is Invalid cross-device link

Subscribers

People subscribed via source and target branches