##// END OF EJS Templates
sshpeer: move docstring to top...
Yuya Nishihara -
r35475:b520c8f9 @8 default
parent child Browse files
Show More
@@ -18,9 +18,9 b' from . import ('
18 )
18 )
19
19
20 def _serverquote(s):
20 def _serverquote(s):
21 """quote a string for the remote shell ... which we assume is sh"""
21 if not s:
22 if not s:
22 return s
23 return s
23 '''quote a string for the remote shell ... which we assume is sh'''
24 if re.match('[a-zA-Z0-9@%_+=:,./-]*$', s):
24 if re.match('[a-zA-Z0-9@%_+=:,./-]*$', s):
25 return s
25 return s
26 return "'%s'" % s.replace("'", "'\\''")
26 return "'%s'" % s.replace("'", "'\\''")
General Comments 0
You need to be logged in to leave comments. Login now