Skip to content
Snippets Groups Projects
Commit b520c8f9 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

sshpeer: move docstring to top

Also makes it use double quotes consistently.
parent 5bec509d
No related branches found
No related tags found
No related merge requests found
......@@ -18,5 +18,6 @@
)
def _serverquote(s):
"""quote a string for the remote shell ... which we assume is sh"""
if not s:
return s
......@@ -21,6 +22,5 @@
if not s:
return s
'''quote a string for the remote shell ... which we assume is sh'''
if re.match('[a-zA-Z0-9@%_+=:,./-]*$', s):
return s
return "'%s'" % s.replace("'", "'\\''")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment