Merge lp:~wallyworld/launchpad/htpasswd-access-permissions into lp:launchpad

Proposed by Ian Booth
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merged at revision: 12006
Proposed branch: lp:~wallyworld/launchpad/htpasswd-access-permissions
Merge into: lp:launchpad
Diff against target: 23 lines (+5/-1)
1 file modified
lib/lp/archivepublisher/htaccess.py (+5/-1)
To merge this branch: bzr merge lp:~wallyworld/launchpad/htpasswd-access-permissions
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+41115@code.launchpad.net

Commit message

[r=jelmer][ui=none][bug=676738] Fix creation of htaccess files so that file permissions are correct

Description of the change

Fix creation of htaccess files so that file permissions are correct. This change effectively reverts the code to the state it was in before rev 11982 landed.

To post a comment you must log in.
Revision history for this message
Ian Booth (wallyworld) wrote :

The code in the mp has been deployed as a cowboy pending a better solution

Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/archivepublisher/htaccess.py'
2--- lib/lp/archivepublisher/htaccess.py 2010-11-08 18:48:09 +0000
3+++ lib/lp/archivepublisher/htaccess.py 2010-11-18 00:04:49 +0000
4@@ -17,6 +17,7 @@
5
6
7 import crypt
8+import os
9
10 from operator import attrgetter
11 from zope.component import getUtility
12@@ -53,7 +54,10 @@
13 :param filename: The file to create.
14 :param users: Iterable over (user, password, salt) tuples.
15 """
16- file = open(filename, "w")
17+ if os.path.isfile(filename):
18+ os.remove(filename)
19+
20+ file = open(filename, "a")
21 try:
22 for entry in users:
23 user, password, salt = entry