parallel-ssh 2.15.0__py3-none-any.whl → 2.16.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {parallel_ssh-2.15.0.dist-info → parallel_ssh-2.16.0.dist-info}/METADATA +1 -1
- {parallel_ssh-2.15.0.dist-info → parallel_ssh-2.16.0.dist-info}/RECORD +9 -9
- pssh/clients/base/single.py +6 -4
- pssh/output.py +17 -2
- {parallel_ssh-2.15.0.dist-info → parallel_ssh-2.16.0.dist-info}/WHEEL +0 -0
- {parallel_ssh-2.15.0.dist-info → parallel_ssh-2.16.0.dist-info}/licenses/COPYING +0 -0
- {parallel_ssh-2.15.0.dist-info → parallel_ssh-2.16.0.dist-info}/licenses/COPYING.LESSER +0 -0
- {parallel_ssh-2.15.0.dist-info → parallel_ssh-2.16.0.dist-info}/licenses/LICENSE +0 -0
- {parallel_ssh-2.15.0.dist-info → parallel_ssh-2.16.0.dist-info}/top_level.txt +0 -0
@@ -1,19 +1,19 @@
|
|
1
|
-
parallel_ssh-2.
|
2
|
-
parallel_ssh-2.
|
3
|
-
parallel_ssh-2.
|
1
|
+
parallel_ssh-2.16.0.dist-info/licenses/COPYING,sha256=ZA2Q9u5AEkH_YoNNDRsz-DBJ6ZuL_foE7RsKFjXd4-c,18093
|
2
|
+
parallel_ssh-2.16.0.dist-info/licenses/COPYING.LESSER,sha256=AKibDRiqzUEU3s95Ei24e_Nb3a8rxQ44PJyfTCYzkLI,24486
|
3
|
+
parallel_ssh-2.16.0.dist-info/licenses/LICENSE,sha256=m4cqigcLitMpxL04D7G_AAD1ZMdQI-yOHmgD8VNkuek,26461
|
4
4
|
pssh/__init__.py,sha256=-2ioNmlJK1Mg2BG2VMODs0uX4zjHWo09HQ2BDu0k8ZI,1491
|
5
5
|
pssh/_version.py,sha256=ORfZeFepHteZV6a-ErdSrZvIosQNSSEdGlc5mCrLh0Q,24494
|
6
6
|
pssh/config.py,sha256=BTdsCyLmwe8oBaveCWYy-Jdd8N2oPS7q0FlNtguqp2Q,11422
|
7
7
|
pssh/constants.py,sha256=0CTBQp82r9eHhm0avOooor4VEQNBom720p9Yn5b2tFE,1103
|
8
8
|
pssh/exceptions.py,sha256=fe4HKlIr0bWCdJGFIDowrT5fF231JqINsiJHx16nKhE,2694
|
9
|
-
pssh/output.py,sha256=
|
9
|
+
pssh/output.py,sha256=d1M9rqKmpxKf1muRvomGXr4yFyIL7DcXGbzWbSjuE-c,5765
|
10
10
|
pssh/utils.py,sha256=Ly3J3G1De9nzujMsZvbnTEfV78bFl2-LkhLKkQTJftw,1849
|
11
11
|
pssh/clients/__init__.py,sha256=m7fYfyw7G_Blc9-gPRDVKSY0w020pkD2n1WxDRrY3bk,883
|
12
12
|
pssh/clients/common.py,sha256=Bb-dFiXwa-0Dtq2JXD1R7ojfJ_-IS91vORRBJ_sAX1Y,1765
|
13
13
|
pssh/clients/reader.py,sha256=wGURuem2xMqnl7sad4bwcB8wrlI3x6HNADZnEGZSXCI,3139
|
14
14
|
pssh/clients/base/__init__.py,sha256=dOC19H9XBNwDQFNnAz6WaRtzM7ZmFpyu86U8DofbOII,812
|
15
15
|
pssh/clients/base/parallel.py,sha256=nkzHATvCbUfT_TmpgfZTZnQ-8I9aWcQvJnZf2BMSpfs,24889
|
16
|
-
pssh/clients/base/single.py,sha256=
|
16
|
+
pssh/clients/base/single.py,sha256=39sw_7SGK92D3-zfVvSCnEZHXXOeFQtWgEopbImmCV8,27544
|
17
17
|
pssh/clients/native/__init__.py,sha256=CUZdR52b4tPyqrBKFUHJlOJRYEGkS3tXgl8q3wd73mA,912
|
18
18
|
pssh/clients/native/parallel.py,sha256=bSzLVIEXLLtJDC6q2tlRv2R3wjSdvUWpDXACihFAJ-U,24933
|
19
19
|
pssh/clients/native/single.py,sha256=Cj00SGxtqNrHu4l_J5P9TP9s_nJKzSVHNpMbStQ5h7g,35687
|
@@ -21,7 +21,7 @@ pssh/clients/native/tunnel.py,sha256=mZyKoblB_vZhQfQaVHQRlv7KWDd_MKcAhE-a72xv-MI
|
|
21
21
|
pssh/clients/ssh/__init__.py,sha256=0oqNL4MXa1DwDX4nWM1nb5y12QkIqGYw1n_xpm-ePp4,904
|
22
22
|
pssh/clients/ssh/parallel.py,sha256=fx1CGDgjlmbgQTGt9FDa9JGkDzkAb41y-RAF69rMV_s,11673
|
23
23
|
pssh/clients/ssh/single.py,sha256=VDtN65-ELXD0BXGUt5u9FFMzArGCDqDJ_rdi8x0Stt4,14383
|
24
|
-
parallel_ssh-2.
|
25
|
-
parallel_ssh-2.
|
26
|
-
parallel_ssh-2.
|
27
|
-
parallel_ssh-2.
|
24
|
+
parallel_ssh-2.16.0.dist-info/METADATA,sha256=wRUuiHkcRw-weigpjXQ4TRx96UKbRVG9napqVYfr2h8,11104
|
25
|
+
parallel_ssh-2.16.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
26
|
+
parallel_ssh-2.16.0.dist-info/top_level.txt,sha256=s8P6ZHOwt2BYgDc62Cpd2z7i-rebGzIhhnO09pger0U,5
|
27
|
+
parallel_ssh-2.16.0.dist-info/RECORD,,
|
pssh/clients/base/single.py
CHANGED
@@ -158,7 +158,9 @@ class InteractiveShell(object):
|
|
158
158
|
self._client._shell(self._chan)
|
159
159
|
self._encoding = encoding
|
160
160
|
self.output = self._client._make_host_output(
|
161
|
-
self._chan, encoding=encoding, read_timeout=read_timeout
|
161
|
+
self._chan, encoding=encoding, read_timeout=read_timeout,
|
162
|
+
fully_qualified_command=None,
|
163
|
+
)
|
162
164
|
|
163
165
|
@property
|
164
166
|
def stdout(self):
|
@@ -471,7 +473,7 @@ class BaseSSHClient(PollMixIn):
|
|
471
473
|
def open_session(self):
|
472
474
|
raise NotImplementedError
|
473
475
|
|
474
|
-
def _make_host_output(self, channel, encoding, read_timeout):
|
476
|
+
def _make_host_output(self, channel, encoding, read_timeout, fully_qualified_command=None):
|
475
477
|
_stdout_buffer = ConcurrentRWBuffer()
|
476
478
|
_stderr_buffer = ConcurrentRWBuffer()
|
477
479
|
_stdout_reader, _stderr_reader = self._make_output_readers(
|
@@ -484,7 +486,7 @@ class BaseSSHClient(PollMixIn):
|
|
484
486
|
host_out = HostOutput(
|
485
487
|
host=self.host, alias=self.alias, channel=channel, stdin=Stdin(channel, self),
|
486
488
|
client=self, encoding=encoding, read_timeout=read_timeout,
|
487
|
-
buffers=_buffers,
|
489
|
+
buffers=_buffers, fully_qualified_command=fully_qualified_command,
|
488
490
|
)
|
489
491
|
return host_out
|
490
492
|
|
@@ -635,7 +637,7 @@ class BaseSSHClient(PollMixIn):
|
|
635
637
|
with GTimeout(seconds=self.timeout):
|
636
638
|
channel = self._execute(_command, use_pty=use_pty)
|
637
639
|
_timeout = read_timeout if read_timeout else timeout
|
638
|
-
host_out = self._make_host_output(channel, encoding, _timeout)
|
640
|
+
host_out = self._make_host_output(channel, encoding, _timeout, fully_qualified_command=_command)
|
639
641
|
return host_out
|
640
642
|
|
641
643
|
def _make_sftp(self):
|
pssh/output.py
CHANGED
@@ -57,11 +57,14 @@ class HostOutput(object):
|
|
57
57
|
__slots__ = ('host', 'channel', 'stdin',
|
58
58
|
'client', 'alias', 'exception',
|
59
59
|
'encoding', 'read_timeout', 'buffers',
|
60
|
+
'fully_qualified_command',
|
60
61
|
)
|
61
62
|
|
62
63
|
def __init__(self, host, channel, stdin,
|
63
64
|
client, alias=None, exception=None, encoding='utf-8', read_timeout=None,
|
64
|
-
buffers=None
|
65
|
+
buffers=None,
|
66
|
+
fully_qualified_command=None,
|
67
|
+
):
|
65
68
|
"""
|
66
69
|
:param host: Host name output is for
|
67
70
|
:type host: str
|
@@ -79,6 +82,15 @@ class HostOutput(object):
|
|
79
82
|
:type read_timeout: float
|
80
83
|
:param buffers: Host buffer data.
|
81
84
|
:type buffers: :py:class:`HostOutputBuffers`
|
85
|
+
:param fully_qualified_command: The fully qualified command after any per-host argument substitution and
|
86
|
+
including command string substitution required for executing via sudo or user-switching via 'su -c', using
|
87
|
+
any specified shell on `run_command` *and* conversion to bytes via provided encoding.
|
88
|
+
The fully_qualified_command is therefor a bytes object that can be saved or otherwise used anywhere bytes can
|
89
|
+
be used without conversion.
|
90
|
+
Use `fully_qualified_command.decode(encoding)` to decode with the encoding used for the equivalent host
|
91
|
+
output object.
|
92
|
+
Always `None` on `HostOutput` from interactive shells.
|
93
|
+
:type fully_qualified_command: bytes
|
82
94
|
"""
|
83
95
|
self.host = host
|
84
96
|
self.channel = channel
|
@@ -89,6 +101,7 @@ class HostOutput(object):
|
|
89
101
|
self.encoding = encoding
|
90
102
|
self.read_timeout = read_timeout
|
91
103
|
self.buffers = buffers
|
104
|
+
self.fully_qualified_command = fully_qualified_command
|
92
105
|
|
93
106
|
@property
|
94
107
|
def stdout(self):
|
@@ -125,10 +138,12 @@ class HostOutput(object):
|
|
125
138
|
"\tchannel={channel}{linesep}" \
|
126
139
|
"\texception={exception}{linesep}" \
|
127
140
|
"\tencoding={encoding}{linesep}" \
|
128
|
-
"\tread_timeout={read_timeout}"
|
141
|
+
"\tread_timeout={read_timeout}{linesep}" \
|
142
|
+
"\tfully_qualified_command={fully_qualified_command}".format(
|
129
143
|
host=self.host, alias=self.alias, channel=self.channel,
|
130
144
|
exception=self.exception, linesep=linesep,
|
131
145
|
exit_code=self.exit_code, encoding=self.encoding, read_timeout=self.read_timeout,
|
146
|
+
fully_qualified_command=self.fully_qualified_command,
|
132
147
|
)
|
133
148
|
|
134
149
|
def __str__(self):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|