Merge ~jslarraz/review-tools:fix-directory-cleanup into review-tools:master

Proposed by Jorge Sancho Larraz
Status: Merged
Merged at revision: 88bf407bb6418e9e120560c1e77aa29ad0037765
Proposed branch: ~jslarraz/review-tools:fix-directory-cleanup
Merge into: review-tools:master
Diff against target: 13 lines (+1/-1)
1 file modified
reviewtools/common.py (+1/-1)
Reviewer Review Type Date Requested Status
Alex Murray Approve
Review via email: mp+466179@code.launchpad.net

Commit message

common.py: use recursive_rm instead of shutil.rmtree to clean temporary review directories (fix issues when not run with root/fakeroot and snap contains write-protected files)

To post a comment you must log in.
Revision history for this message
Alex Murray (alexmurray) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reviewtools/common.py b/reviewtools/common.py
2index 37f9ff4..3e3ebdb 100644
3--- a/reviewtools/common.py
4+++ b/reviewtools/common.py
5@@ -348,7 +348,7 @@ class Review(ReviewBase):
6 is automatically called on object deletion
7 """
8 if os.path.exists(self.tmp_dir):
9- shutil.rmtree(self.tmp_dir)
10+ recursive_rm(self.tmp_dir)
11
12 def _extract_file(self, fn):
13 """Extract file"""

Subscribers

People subscribed via source and target branches