Merge lp:~stub/launchpad/bug-3050 into lp:launchpad

Proposed by Stuart Bishop
Status: Merged
Approved by: Jonathan Lange
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~stub/launchpad/bug-3050
Merge into: lp:launchpad
Diff against target: 16 lines
1 file modified
lib/canonical/database/sqlbase.py (+4/-2)
To merge this branch: bzr merge lp:~stub/launchpad/bug-3050
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Approve
Review via email: mp+12977@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

All scripts now connect as an explicit database user, so we can finally close long standing Bug #3050.

Revision history for this message
Jonathan Lange (jml) wrote :

Hi stub,

Thanks for getting to this! Please run the tests before landing (may I recommend ec2 land?).

jml

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/database/sqlbase.py'
2--- lib/canonical/database/sqlbase.py 2009-07-19 04:41:14 +0000
3+++ lib/canonical/database/sqlbase.py 2009-10-07 09:05:26 +0000
4@@ -291,8 +291,10 @@
5 if match is not None:
6 dbhost = match.group(1)
7
8- if dbuser is None:
9- dbuser = config.launchpad.dbuser
10+ assert dbuser is not None, '''
11+ dbuser is now required. All scripts must connect as unique
12+ database users.
13+ '''
14
15 isolation_level = {
16 ISOLATION_LEVEL_AUTOCOMMIT: 'autocommit',