Skip to content

Commit

Permalink
[#1738] Cover the case when calling via paster.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Jun 3, 2014
1 parent 0ea13e8 commit 3b10626
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/datastore/bin/datastore_setup.py
Expand Up @@ -24,7 +24,7 @@ def _run_cmd(command_line, inputstring=''):
def _run_sql(sql, as_sql_user, pgport, database='postgres'):
logging.debug("Executing: \n#####\n", sql, "\n####\nOn database:", database)
_run_cmd("sudo -u '{username}' psql -p {pgport} --dbname='{database}' --no-password --set ON_ERROR_STOP=1".format(
pgport=pgport,
pgport=pgport or '5432',
username=as_sql_user,
database=database
), inputstring=sql)
Expand Down
1 change: 1 addition & 0 deletions ckanext/datastore/commands.py
Expand Up @@ -59,6 +59,7 @@ def command(self):
if cmd == 'set-permissions':
setup.set_permissions(
pguser=self.args[1],
pgport=self.db_ckan_url_parts['db_port'],
ckandb=self.db_ckan_url_parts['db_name'],
datastoredb=self.db_write_url_parts['db_name'],
ckanuser=self.db_ckan_url_parts['db_user'],
Expand Down

0 comments on commit 3b10626

Please sign in to comment.