From bb282eb19c48b5770186d136e8a40c0573ef59b9 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 15 Nov 2018 15:17:27 +0000 Subject: [PATCH] wa: Remove reference to devlibs escaping methods As part of https://github.com/ARM-software/devlib/pull/339 the escaping method are being removed in favour of using `quote` from `pipes` so also make reflecting changes here. --- wa/commands/show.py | 5 ++--- wa/utils/misc.py | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wa/commands/show.py b/wa/commands/show.py index 2641d028..3d673358 100644 --- a/wa/commands/show.py +++ b/wa/commands/show.py @@ -20,6 +20,7 @@ import sys from subprocess import call, Popen, PIPE +from pipes import quote from wa import Command from wa.framework import pluginloader @@ -31,8 +32,6 @@ from wa.utils.doc import (strip_inlined_text, get_rst_from_plugin, get_params_rst, underline) from wa.utils.misc import which -from devlib.utils.misc import escape_double_quotes - class ShowCommand(Command): @@ -87,7 +86,7 @@ class ShowCommand(Command): title = '.TH {}{} 7'.format(kind, plugin_name) output = '\n'.join([title, body]) - call('echo "{}" | man -l -'.format(escape_double_quotes(output)), shell=True) + call('echo {} | man -l -'.format(quote(output)), shell=True) else: print(rst_output) # pylint: disable=superfluous-parens diff --git a/wa/utils/misc.py b/wa/utils/misc.py index b1e3cf55..6129a4c5 100644 --- a/wa/utils/misc.py +++ b/wa/utils/misc.py @@ -49,7 +49,6 @@ from devlib.exception import TargetError from devlib.utils.misc import (ABI_MAP, check_output, walk_modules, ensure_directory_exists, ensure_file_directory_exists, normalize, convert_new_lines, get_cpu_mask, unique, - escape_quotes, escape_single_quotes, escape_double_quotes, isiterable, getch, as_relative, ranges_to_list, memoized, list_to_ranges, list_to_mask, mask_to_list, which, to_identifier)