Skip to content

Commit

Permalink
Merge pull request #3360 from ckan/3360-cli-fail-failing
Browse files Browse the repository at this point in the history
cli: TypeError: expected a character buffer object
  • Loading branch information
TkTech committed Dec 9, 2016
2 parents 727fe76 + 9f6d4a5 commit 31b8167
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ckan/lib/cli.py
Expand Up @@ -13,6 +13,7 @@
import logging
import urlparse
from optparse import OptionConflictError
import traceback

import sqlalchemy as sa
import routes
Expand Down Expand Up @@ -851,7 +852,7 @@ def add(self):
user_dict = logic.get_action('user_create')(context, data_dict)
pprint(user_dict)
except logic.ValidationError, e:
error(e)
error(traceback.format_exc())

def remove(self):
import ckan.model as model
Expand Down Expand Up @@ -1491,10 +1492,8 @@ def profile_url(url):
print 'App error: ', url.strip()
except KeyboardInterrupt:
raise
except:
import traceback
traceback.print_exc()
print 'Unknown error: ', url.strip()
except Exception:
error(traceback.format_exc())

output_filename = 'ckan%s.profile' % re.sub('[/?]', '.', url.replace('/', '.'))
profile_command = "profile_url('%s')" % url
Expand Down Expand Up @@ -2478,7 +2477,7 @@ def command(self):
config_filepath, options, self.options.section,
edit=self.options.edit)
except config_tool.ConfigToolError, e:
error(e)
error(traceback.format_exc())


class JobsCommand(CkanCommand):
Expand Down

0 comments on commit 31b8167

Please sign in to comment.