diff options
author | Jack Diederich <jackdied@gmail.com> | 2010-02-22 22:31:00 +0000 |
---|---|---|
committer | Jack Diederich <jackdied@gmail.com> | 2010-02-22 22:31:00 +0000 |
commit | c65d55fc3f8ab248fc896061111f32b28fb31b9f (patch) | |
tree | 74c02a06d26245ee04e2b6feb77daef85ceceb29 /Lib/pipes.py | |
parent | 0c01ad35258579815bb7003f68024d50b1be4244 (diff) | |
download | cpython-git-c65d55fc3f8ab248fc896061111f32b28fb31b9f.tar.gz |
Merged revisions 78339 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78339 | jack.diederich | 2010-02-22 16:27:38 -0500 (Mon, 22 Feb 2010) | 1 line
* fix issue#7476
........
Diffstat (limited to 'Lib/pipes.py')
-rw-r--r-- | Lib/pipes.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/pipes.py b/Lib/pipes.py index 6dcc997b4c..25e99159b8 100644 --- a/Lib/pipes.py +++ b/Lib/pipes.py @@ -267,10 +267,13 @@ _safechars = string.ascii_letters + string.digits + '!@%_-+=:,./' # Safe unquote _funnychars = '"`$\\' # Unsafe inside "double quotes" def quote(file): + ''' return a shell-escaped version of the file string ''' for c in file: if c not in _safechars: break else: + if not file: + return "''" return file if '\'' not in file: return '\'' + file + '\'' |