commit | 5cac46dd413766411dc12758d53b6a7e6b691171 | [log] [tgz] |
---|---|---|
author | Jack Diederich <jackdied@gmail.com> | Mon Feb 22 21:27:38 2010 +0000 |
committer | Jack Diederich <jackdied@gmail.com> | Mon Feb 22 21:27:38 2010 +0000 |
tree | 547964521be128e31195247a75811adfa3355b47 | |
parent | f2055ae43d25013d9e7b74c2cf23128b28229557 [diff] [blame] |
* fix issue#7476
diff --git a/Lib/pipes.py b/Lib/pipes.py index 6dcc997..25e9915 100644 --- a/Lib/pipes.py +++ b/Lib/pipes.py
@@ -267,10 +267,13 @@ _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 + '\''