Skip to content

Commit

Permalink
grass.script: replace deprecated use of pipes.quote() (OSGeo#2674)
Browse files Browse the repository at this point in the history
'pipes' is deprecated since Python 3.11 and will be removed in version 3.13.
'pipes.quote()' is deprecated since version 2.7.
  • Loading branch information
nilason authored Dec 1, 2022
1 parent b2d196c commit 464ffca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/grass/script/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import codecs
import string
import random
import pipes
import shlex
from tempfile import NamedTemporaryFile

from .utils import KeyValue, parse_key_val, basename, encode, decode, try_remove
Expand Down Expand Up @@ -863,7 +863,7 @@ def parser():
sys.exit(1)

cmdline = [basename(sys.argv[0])]
cmdline += [pipes.quote(a) for a in sys.argv[1:]]
cmdline += [shlex.quote(a) for a in sys.argv[1:]]
os.environ["CMDLINE"] = " ".join(cmdline)

argv = sys.argv[:]
Expand Down

0 comments on commit 464ffca

Please sign in to comment.