def _sync_command_error_squashed(arguments, logger):
 message = None
 log_arguments = ' '.join(arguments)
 try:
  process = Popen(arguments, stdout=PIPE, stderr=STDOUT)
  output = process.stdout.read()
  status = process.wait()
 except Exception as e:
  message = ZFS_ERROR(zfs_command=log_arguments, output=str(e), status=1)
 else:
  if status:
   message = ZFS_ERROR(zfs_command=log_arguments, output=output, status=status)
 if (message is not None):
  message.write(logger)

def _sync_command_error_squashed ( arguments , logger ) : message = None log_arguments = ' ' . join ( arguments ) try : process = Popen ( arguments , stdout = PIPE , stderr = STDOUT ) output = process . stdout . read ( ) status = process . wait ( ) except Exception as e : message = ZFS_ERROR ( zfs_command = log_arguments , output = str ( e ) , status = 1 ) else : if status : message = ZFS_ERROR ( zfs_command = log_arguments , output = output , status = status ) if ( message is not None ) : message . write ( logger )
synchronously run a command-line tool with the given arguments .