summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-02-20 14:04:54 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-02-20 14:04:54 +0000
commit39cea3df1559edec472b1ab40712e00a83504afc (patch)
tree6a0199cb5669dff64c94a504a452f6c4405bf2af /lorry
parent422915148b55ceca4df0c720a7354001d24970f5 (diff)
downloadlorry-39cea3df1559edec472b1ab40712e00a83504afc.tar.gz
Update quote_url() to replace : with _.
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry13
1 files changed, 10 insertions, 3 deletions
diff --git a/lorry b/lorry
index a99d5f4..615e75b 100755
--- a/lorry
+++ b/lorry
@@ -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):