multiSSH3 5.53__tar.gz → 5.54__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: multiSSH3
3
- Version: 5.53
3
+ Version: 5.54
4
4
  Summary: Run commands on multiple hosts via SSH
5
5
  Home-page: https://github.com/yufei-pan/multiSSH3
6
6
  Author: Yufei Pan
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: multiSSH3
3
- Version: 5.53
3
+ Version: 5.54
4
4
  Summary: Run commands on multiple hosts via SSH
5
5
  Home-page: https://github.com/yufei-pan/multiSSH3
6
6
  Author: Yufei Pan
@@ -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.53'
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 type(data) == str:
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 type(data) != list:
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 type(host.extraargs) == str:
1241
+ if host.extraargs and isinstance(host.extraargs, str):
1242
1242
  extraargs = host.extraargs.split()
1243
- elif host.extraargs and type(host.extraargs) == list:
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 type(host) is str:
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 type(hosts) == str else frozenset(hosts)
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 type(commands) == str else commands
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 type(command) == str else command for command in commands]
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.")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes