refactor applehelp: Use shlex.quote() instead of pipes.quote()

This commit is contained in:
Takeshi KOMIYA 2019-01-11 01:22:02 +09:00
parent aa4d4917f7
commit bf62a96831

View File

@ -8,7 +8,6 @@
:license: BSD, see LICENSE for details. :license: BSD, see LICENSE for details.
""" """
import pipes
import plistlib import plistlib
import shlex import shlex
import subprocess import subprocess
@ -205,7 +204,7 @@ class AppleHelpBuilder(StandaloneHTMLBuilder):
if self.config.applehelp_disable_external_tools: if self.config.applehelp_disable_external_tools:
logger.info(__('skipping')) logger.info(__('skipping'))
logger.warning(__('you will need to index this help book with:\n %s'), logger.warning(__('you will need to index this help book with:\n %s'),
' '.join([pipes.quote(arg) for arg in args])) ' '.join([shlex.quote(arg) for arg in args]))
else: else:
try: try:
p = subprocess.Popen(args, p = subprocess.Popen(args,
@ -240,7 +239,7 @@ class AppleHelpBuilder(StandaloneHTMLBuilder):
if self.config.applehelp_disable_external_tools: if self.config.applehelp_disable_external_tools:
logger.info(__('skipping')) logger.info(__('skipping'))
logger.warning(__('you will need to sign this help book with:\n %s'), logger.warning(__('you will need to sign this help book with:\n %s'),
' '.join([pipes.quote(arg) for arg in args])) ' '.join([shlex.quote(arg) for arg in args]))
else: else:
try: try:
p = subprocess.Popen(args, p = subprocess.Popen(args,