Merge lp:~townsend/unity8-preview-lxc/fix-create-dirs into lp:unity8-preview-lxc/stable

Proposed by Christopher Townsend
Status: Merged
Approved by: Stephen M. Webb
Approved revision: 60
Merged at revision: 60
Proposed branch: lp:~townsend/unity8-preview-lxc/fix-create-dirs
Merge into: lp:unity8-preview-lxc/stable
Diff against target: 18 lines (+4/-2)
1 file modified
bin/unity8-lxc-setup (+4/-2)
To merge this branch: bzr merge lp:~townsend/unity8-preview-lxc/fix-create-dirs
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
Review via email: mp+261618@code.launchpad.net

Commit message

Be smart about creating some directories by checking if they exist first.

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/unity8-lxc-setup'
2--- bin/unity8-lxc-setup 2015-06-09 14:17:10 +0000
3+++ bin/unity8-lxc-setup 2015-06-10 13:19:50 +0000
4@@ -230,10 +230,12 @@
5 parser.error("No Unity 8 Desktop Next ISO exists!")
6
7 ## Mount the ISO
8- os.mkdir(iso_path)
9+ if not os.path.exists(iso_path):
10+ os.mkdir(iso_path)
11 subprocess.call(["mount", "-o", "loop,ro", iso_filename, iso_path])
12
13- os.mkdir(squashfs_path)
14+ if not os.path.exists(squashfs_path):
15+ os.mkdir(squashfs_path)
16 subprocess.call(["mount", "-o", "loop,ro",
17 os.path.join(iso_path, "casper", "filesystem.squashfs"),
18 squashfs_path])

Subscribers

People subscribed via source and target branches

to all changes: