~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/schema/security.py

  • Committer: Stuart Bishop
  • Date: 2011-07-25 14:10:46 UTC
  • mto: (7675.1045.660 db-devel)
  • mto: This revision was merged to the branch mainline in revision 13516.
  • Revision ID: stuart.bishop@canonical.com-20110725141046-y795uhabiolfnlk6
delint

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
 
64
64
 
65
65
class DbSchema(dict):
66
 
    groups = None # List of groups defined in the db
67
 
    users = None # List of users defined in the db
 
66
    groups = None  # List of groups defined in the db
 
67
    users = None  # List of users defined in the db
68
68
 
69
69
    def __init__(self, con):
70
70
        super(DbSchema, self).__init__()
159
159
    config.read([configfile_name])
160
160
 
161
161
    con = connect(options.dbuser)
162
 
    cur = CursorWrapper(con.cursor())
163
162
 
164
163
    if options.cluster:
165
164
        nodes = replication.helpers.get_nodes(con, 1)
394
393
        # block on a live system.
395
394
        for obj in schema.values():
396
395
            if obj.type in ("function", "sequence"):
397
 
                pass # Can't change ownership of functions or sequences
 
396
                pass  # Can't change ownership of functions or sequences
398
397
            else:
399
398
                if obj.owner != options.owner:
400
399
                    log.info("Resetting ownership of %s", obj.fullname)