Merge lp:~frankban/launchpad/bug-953902-isolation-failure into lp:launchpad

Proposed by Francesco Banconi
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 14941
Proposed branch: lp:~frankban/launchpad/bug-953902-isolation-failure
Merge into: lp:launchpad
Diff against target: 11 lines (+2/-0)
1 file modified
lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py (+2/-0)
To merge this branch: bzr merge lp:~frankban/launchpad/bug-953902-isolation-failure
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+97200@code.launchpad.net

Description of the change

== Changes ==

Updated HtaccessTokenGenerator.generateHtpasswd to create the access root directory if it does not exist.
This solves 2 test failures when tests are run in isolation.

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py'
2--- lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py 2012-01-01 02:58:52 +0000
3+++ lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py 2012-03-13 12:04:44 +0000
4@@ -88,6 +88,8 @@
5 """
6 # Create a temporary file that will be a new .htpasswd.
7 pub_config = getPubConfig(ppa)
8+ if not os.path.exists(pub_config.htaccessroot):
9+ os.makedirs(pub_config.htaccessroot)
10 fd, temp_filename = tempfile.mkstemp(dir=pub_config.htaccessroot)
11 os.close(fd)
12