diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 115: Fix for bug #853657 from Yongqin

Message ID 20110919215711.22328.43108.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Paul Larson Sept. 19, 2011, 9:57 p.m. UTC
Merge authors:
  Yongqin Liu (liuyq0307)
Related merge proposals:
  https://code.launchpad.net/~liuyq0307/lava-dispatcher/fix-853657/+merge/75955
  proposed by: Yongqin Liu (liuyq0307)
  review: Approve - Paul Larson (pwlars)
------------------------------------------------------------
revno: 115 [merge]
committer: Paul Larson <paul.larson@canonical.com>
branch nick: lava-dispatcher
timestamp: Mon 2011-09-19 16:55:48 -0500
message:
  Fix for bug #853657 from Yongqin
modified:
  lava_dispatcher/utils.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== 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