diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-02-20 14:04:54 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-02-20 14:04:54 +0000 |
commit | 39cea3df1559edec472b1ab40712e00a83504afc (patch) | |
tree | 6a0199cb5669dff64c94a504a452f6c4405bf2af /lorry | |
parent | 422915148b55ceca4df0c720a7354001d24970f5 (diff) | |
download | lorry-39cea3df1559edec472b1ab40712e00a83504afc.tar.gz |
Update quote_url() to replace : with _.
Diffstat (limited to 'lorry')
-rwxr-xr-x | lorry | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -25,12 +25,19 @@ import sys __version__ = '0.0' -_valid_chars = string.digits + string.letters + ':%_' - def quote_url(url): - transl = lambda x: x if x in _valid_chars else '_' + ''' Convert URIs to strings that only contain digits, letters, % and _. + + NOTE: When changing the code of this function, make sure to also apply + the same to the quote_url() function of morph. Otherwise the git bundles + generated by lorry may no longer be found by morph. + + ''' + valid_chars = string.digits + string.letters + '%_' + transl = lambda x: x if x in valid_chars else '_' return ''.join([transl(x) for x in url]) + class Lorry(cliapp.Application): def add_settings(self): |