[ckan-changes] commit/ckan: dread: [cli]: Allow dumping and restoreing with db username with non-letters in it.

Bitbucket commits-noreply at bitbucket.org
Tue Nov 8 18:05:12 UTC 2011


1 new commit in ckan:


https://bitbucket.org/okfn/ckan/changeset/a1bd176fe375/
changeset:   a1bd176fe375
user:        dread
date:        2011-11-08 18:59:46
summary:     [cli]: Allow dumping and restoreing with db username with non-letters in it.
affected #:  1 file

diff -r 01e3f111cf6aceaa29d42306ec3903533a166cb7 -r a1bd176fe3758608185f72ecbc6bf7858eb957b9 ckan/lib/cli.py
--- a/ckan/lib/cli.py
+++ b/ckan/lib/cli.py
@@ -126,7 +126,7 @@
         from pylons import config
         url = config['sqlalchemy.url']
         # e.g. 'postgres://tester:pass@localhost/ckantest3'
-        db_details_match = re.match('^\s*(?P<db_type>\w*)://(?P<db_user>\w*):?(?P<db_pass>[^@]*)@(?P<db_host>[^/:]*):?(?P<db_port>[^/]*)/(?P<db_name>[\w.-]*)', url)
+        db_details_match = re.match('^\s*(?P<db_type>\w*)://(?P<db_user>[^:]*):?(?P<db_pass>[^@]*)@(?P<db_host>[^/:]*):?(?P<db_port>[^/]*)/(?P<db_name>[\w.-]*)', url)
         if not db_details_match:
             raise Exception('Could not extract db details from url: %r' % url)
         db_details = db_details_match.groupdict()

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list