Skip to content

Commit

Permalink
Fix codestyle in CLI commands
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Jul 30, 2019
1 parent 2617bfd commit ee8df9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ckan/cli/less.py
Expand Up @@ -61,7 +61,7 @@ def less():
directory = output[0].strip()
if not directory:
error_shout(u'Command "{}" returned nothing. Check that npm is '
u'installed.'.format(' '.join(command)))
u'installed.'.format(u' '.join(command)))
less_bin = os.path.join(directory, u'lessc')

public = config.get(u'ckan.base_public_folder')
Expand Down
7 changes: 4 additions & 3 deletions ckan/cli/tracking.py
Expand Up @@ -145,7 +145,8 @@ def update_tracking(engine, summary_date):
sql = u'''UPDATE tracking_summary t
SET package_id = COALESCE(
(SELECT id FROM package p
WHERE p.name = regexp_replace(' ' || t.url, '^[ ]{1}(/\w{2}){0,1}' || %s, ''))
WHERE p.name = regexp_replace
(' ' || t.url, '^[ ]{1}(/\\w{2}){0,1}' || %s, ''))
,'~~not~found~~')
WHERE t.package_id IS NULL
AND tracking_type = 'page';'''
Expand Down Expand Up @@ -202,8 +203,8 @@ def update_tracking_solr(engine, start_date):

total = len(package_ids)
not_found = 0
click.echo('{} package index{} to be rebuilt starting from {}'.format(
total, '' if total < 2 else 'es', start_date)
click.echo(u'{} package index{} to be rebuilt starting from {}'.format(
total, u'' if total < 2 else u'es', start_date)
)

from ckan.lib.search import rebuild
Expand Down

0 comments on commit ee8df9e

Please sign in to comment.