Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions py/common/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import errno
import os
import re
import shlex
import shutil
import signal
import socket
Expand All @@ -30,7 +31,6 @@
import tempfile

# local imports
from csmock.common.util import shell_quote
from csmock.common.util import strlist_to_shell_cmd

CSGREP_FINAL_FILTER_ARGS = "--invert-match --event \"internal warning\" \
Expand Down Expand Up @@ -208,7 +208,7 @@ def exec_cmd(self, cmd, shell=False, echo=True):
self.handle_ec()
if echo:
if shell:
self.print_with_ts(shell_quote(cmd))
self.print_with_ts(cmd)
else:
self.print_with_ts(strlist_to_shell_cmd(cmd, escape_special=True))
try:
Expand Down Expand Up @@ -412,5 +412,5 @@ def handle_known_fp_list(props, results):
if len(path_re) == 0 or path_re.startswith("#"):
# skip comments and empty lines
continue
filter_cmd = f'csgrep --mode=json --invert-match --path="{shell_quote(path_re)}"'
filter_cmd = f'csgrep --mode=json --invert-match --path={shlex.quote(path_re)}'
props.result_filters += [filter_cmd]