multiSSH3 5.53__py3-none-any.whl → 5.54__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.
Potentially problematic release.
This version of multiSSH3 might be problematic. Click here for more details.
- multiSSH3.py +9 -9
- {multissh3-5.53.dist-info → multissh3-5.54.dist-info}/METADATA +1 -1
- multissh3-5.54.dist-info/RECORD +6 -0
- multissh3-5.53.dist-info/RECORD +0 -6
- {multissh3-5.53.dist-info → multissh3-5.54.dist-info}/WHEEL +0 -0
- {multissh3-5.53.dist-info → multissh3-5.54.dist-info}/entry_points.txt +0 -0
- {multissh3-5.53.dist-info → multissh3-5.54.dist-info}/top_level.txt +0 -0
multiSSH3.py
CHANGED
|
@@ -54,7 +54,7 @@ except AttributeError:
|
|
|
54
54
|
# If neither is available, use a dummy decorator
|
|
55
55
|
def cache_decorator(func):
|
|
56
56
|
return func
|
|
57
|
-
version = '5.
|
|
57
|
+
version = '5.54'
|
|
58
58
|
VERSION = version
|
|
59
59
|
__version__ = version
|
|
60
60
|
COMMIT_DATE = '2025-03-01'
|
|
@@ -494,7 +494,7 @@ def pretty_format_table(data, delimiter = '\t',header = None):
|
|
|
494
494
|
version = 1.11
|
|
495
495
|
if not data:
|
|
496
496
|
return ''
|
|
497
|
-
if
|
|
497
|
+
if isinstance(data, str):
|
|
498
498
|
data = data.strip('\n').split('\n')
|
|
499
499
|
data = [line.split(delimiter) for line in data]
|
|
500
500
|
elif isinstance(data, dict):
|
|
@@ -506,7 +506,7 @@ def pretty_format_table(data, delimiter = '\t',header = None):
|
|
|
506
506
|
else:
|
|
507
507
|
# it is a dict of lists
|
|
508
508
|
data = [[key] + list(value) for key, value in data.items()]
|
|
509
|
-
elif
|
|
509
|
+
elif not isinstance(data, list):
|
|
510
510
|
data = list(data)
|
|
511
511
|
# format the list into 2d list of list of strings
|
|
512
512
|
if isinstance(data[0], dict):
|
|
@@ -1238,9 +1238,9 @@ def run_command(host, sem, timeout=60,passwds=None, retry_limit = 5):
|
|
|
1238
1238
|
host.command = replace_magic_strings(host.command,['#PASSWD#','#PASSWORD#'],passwds,case_sensitive=False)
|
|
1239
1239
|
host.command = replace_magic_strings(host.command,['#UUID#'],str(host.uuid),case_sensitive=False)
|
|
1240
1240
|
formatedCMD = []
|
|
1241
|
-
if host.extraargs and
|
|
1241
|
+
if host.extraargs and isinstance(host.extraargs, str):
|
|
1242
1242
|
extraargs = host.extraargs.split()
|
|
1243
|
-
elif host.extraargs and
|
|
1243
|
+
elif host.extraargs and isinstance(host.extraargs, list):
|
|
1244
1244
|
extraargs = [str(arg) for arg in host.extraargs]
|
|
1245
1245
|
else:
|
|
1246
1246
|
extraargs = []
|
|
@@ -2377,7 +2377,7 @@ def formHostStr(host) -> str:
|
|
|
2377
2377
|
"""
|
|
2378
2378
|
if not host or len(host) == 0:
|
|
2379
2379
|
return 'EMPTY_HOSTS'
|
|
2380
|
-
if
|
|
2380
|
+
if isinstance(host, str):
|
|
2381
2381
|
host = set(host.replace(',',' ').replace('\n',' ').replace('\r',' ').replace('\t',' ').replace(';', ' ').replace('|', ' ').replace('/', ' ').replace('&',' ').split())
|
|
2382
2382
|
else:
|
|
2383
2383
|
host = set(host)
|
|
@@ -2429,7 +2429,7 @@ def getStrCommand(hosts = DEFAULT_HOSTS,commands = None,oneonone = DEFAULT_ONE_O
|
|
|
2429
2429
|
single_window = DEFAULT_SINGLE_WINDOW,file_sync = False,error_only = DEFAULT_ERROR_ONLY, identity_file = DEFAULT_IDENTITY_FILE,
|
|
2430
2430
|
copy_id = False,
|
|
2431
2431
|
shortend = False):
|
|
2432
|
-
hosts = hosts if
|
|
2432
|
+
hosts = hosts if isinstance(hosts,str) else frozenset(hosts)
|
|
2433
2433
|
hostStr = formHostStr(hosts)
|
|
2434
2434
|
files = frozenset(files) if files else None
|
|
2435
2435
|
argsStr = __formCommandArgStr(oneonone = oneonone, timeout = timeout,password = password,
|
|
@@ -2543,10 +2543,10 @@ def run_command_on_hosts(hosts = DEFAULT_HOSTS,commands = None,oneonone = DEFAUL
|
|
|
2543
2543
|
if not commands:
|
|
2544
2544
|
commands = []
|
|
2545
2545
|
else:
|
|
2546
|
-
commands = [commands] if
|
|
2546
|
+
commands = [commands] if isinstance(commands,str) else commands
|
|
2547
2547
|
# reformat commands into a list of strings, join the iterables if they are not strings
|
|
2548
2548
|
try:
|
|
2549
|
-
commands = [' '.join(command) if not
|
|
2549
|
+
commands = [' '.join(command) if not isinstance(command,str) else command for command in commands]
|
|
2550
2550
|
except:
|
|
2551
2551
|
pass
|
|
2552
2552
|
eprint(f"Warning: commands should ideally be a list of strings. Now mssh had failed to convert {commands!r} to a list of strings. Continuing anyway but expect failures.")
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
multiSSH3.py,sha256=-WP8EeQQj-wIIRX-QDUbOr0D66iEQJS9F0oZebbSPwE,139313
|
|
2
|
+
multissh3-5.54.dist-info/METADATA,sha256=t0ulRcBi1UXGWV0_OlCwdwxCYYXqYGSoeY7pH6uF8k8,18092
|
|
3
|
+
multissh3-5.54.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
4
|
+
multissh3-5.54.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
+
multissh3-5.54.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
+
multissh3-5.54.dist-info/RECORD,,
|
multissh3-5.53.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
multiSSH3.py,sha256=He_eEFBNL2XagaUGJW68Lzhh5jcGcW_0UDH-pfHwRMk,139280
|
|
2
|
-
multissh3-5.53.dist-info/METADATA,sha256=UJEt_zyJis2eOCc3EL4bbg9UtJWyQG8I3Akc7EGDnes,18092
|
|
3
|
-
multissh3-5.53.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
4
|
-
multissh3-5.53.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
-
multissh3-5.53.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
-
multissh3-5.53.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|