Skip to content

Commit

Permalink
Merge pull request #77 from rundeck-plugins/issue/1869_fails-with-per…
Browse files Browse the repository at this point in the history
…cent-character

Issue/1869 fails with percent character
  • Loading branch information
ltamaster authored Jul 20, 2021
2 parents b9b344e + b163192 commit cfec922
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contents/winrm_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
PY34 = sys.version_info[0:2] >= (3, 4)
RD = "RD_"
RD_COMMAND = "RD_EXEC_COMMAND"

if PY3:
string_types = str,
Expand All @@ -53,7 +55,7 @@ def run_cmd(self, command, args=(), out_stream=None, err_stream=None):

envs = {}
for a in os.environ:
if a.startswith('RD_'):
if a.startswith(RD) and a != RD_COMMAND:
envs.update({a:os.getenv(a)})

# TODO optimize perf. Do not call open/close shell every time
Expand Down

0 comments on commit cfec922

Please sign in to comment.