[libcxx-commits] [PATCH] D99242: [libcxx] [test] Quote env variables that are set with a shell "export" in ssh.py

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 24 15:55:48 PDT 2021

Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.

LGTM, as long as the commit message contains that example! Sounds like an almost-complete example of what I'm looking for is
`libcxx/utils/ssh.py --env "X=Y;Z" something`

Comment at: libcxx/utils/ssh.py:28
+   from shlex import quote as cmd_quote
+except ImportError:
+   from pipes import quote as cmd_quote
Let's leave a comment here like `# for Python 2 compatibility`
I switched from "Python 2 chauvinist" to "Python 3 chauvinist" a year or so ago — IIRC just after Python 2 was officially end-of-lifed in January 2020. So I'm happy //not// to cater to anyone still stuck on Python 2, but I don't mind (as long as we leave the greppable comment for later cleanup).

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list