Skip to content
Browse files

bug 751731 - assume roles.sql is idempotent

  • Loading branch information...
1 parent 2c8b8b2 commit 749443c6d7f04f656d9ad905eed966ae72d9a5d1 @rhelmer rhelmer committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 socorro/external/postgresql/setupdb_app.py
View
4 socorro/external/postgresql/setupdb_app.py
@@ -146,8 +146,8 @@ def main(self):
dsn = dsn_template % self.database_name
with PostgreSQLManager(dsn, self.config.logger) as db:
- for line in open('sql/roles.sql'):
- db.execute(line, [r'role "\w+" already exists'])
+ with open('sql/roles.sql') as f:
+ db.execute(f.read())
for lang in ['plpgsql', 'plperl']:
db.execute('CREATE LANGUAGE "%s"' % lang,

0 comments on commit 749443c

Please sign in to comment.
Something went wrong with that request. Please try again.