From 29d18653dcd4c7cd5ebeea2521b7f17607d67c38 Mon Sep 17 00:00:00 2001 From: Arka Dash Date: Thu, 5 Dec 2024 00:07:03 +0530 Subject: [PATCH 1/2] Using shlex.split instead str.split --- pantalaimon/panctl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pantalaimon/panctl.py b/pantalaimon/panctl.py index 6519d8b..8e087d0 100644 --- a/pantalaimon/panctl.py +++ b/pantalaimon/panctl.py @@ -20,6 +20,7 @@ import sys from collections import defaultdict from itertools import zip_longest from typing import List +from shlex import split import attr import click @@ -589,7 +590,7 @@ class PanCtl: parser = PanctlParser(self.commands) try: - args = parser.parse_args(result.split()) + args = parser.parse_args(split(result)) except ParseError: continue From 42cdcc251924a7c99528fa56b1c77824865c0ffc Mon Sep 17 00:00:00 2001 From: Arka Dash Date: Thu, 5 Dec 2024 11:07:05 +0530 Subject: [PATCH 2/2] set posix to False --- pantalaimon/panctl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pantalaimon/panctl.py b/pantalaimon/panctl.py index 8e087d0..a6e6c89 100644 --- a/pantalaimon/panctl.py +++ b/pantalaimon/panctl.py @@ -590,7 +590,7 @@ class PanCtl: parser = PanctlParser(self.commands) try: - args = parser.parse_args(split(result)) + args = parser.parse_args(split(result, posix=False)) except ParseError: continue