[Reproducible-builds] [dh-python] 88/183: fix fallback code for shlex.quote
Jérémy Bobbio
lunar at moszumanska.debian.org
Fri Sep 19 15:30:23 UTC 2014
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dh-python.
commit bfa31b07ad51a2e18cebf470abe5f41ac6161103
Author: Piotr Ożarowski <piotr at debian.org>
Date: Tue Aug 27 20:50:45 2013 +0200
fix fallback code for shlex.quote
---
dhpython/build/base.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dhpython/build/base.py b/dhpython/build/base.py
index c9e0781..3a0c224 100644
--- a/dhpython/build/base.py
+++ b/dhpython/build/base.py
@@ -31,7 +31,9 @@ try:
except ImportError:
# shlex.quote is new in Python 3.3
def quote(s):
- return ("'" + s.replace("'", "'\"'\"'") + "'") if "'" in s else s
+ if not s:
+ return "''"
+ return "'" + s.replace("'", "'\"'\"'") + "'"
log = logging.getLogger('dhpython')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dh-python.git
More information about the Reproducible-builds
mailing list