def get_version_output(binary, version_cmd):
 cmd = []
 for item in (binary, version_cmd):
  if isinstance(item, list):
   cmd.extend(item)
  else:
   cmd.append(item)
 if os.path.isfile(cmd[0]):
  (_, output, _) = module.run_command(cmd)
 return output

def get_version_output ( binary , version_cmd ) : cmd = [ ] for item in ( binary , version_cmd ) : if isinstance ( item , list ) : cmd . extend ( item ) else : cmd . append ( item ) if os . path . isfile ( cmd [ 0 ] ) : ( _ , output , _ ) = module . run_command ( cmd ) return output
runs and returns the version output for a command .