code: def check_destination(self, location, group):
          '''
          Check destination for the archives.
          :return:
          '''
          # Pre-create destination, since rsync will
          # put one file named as group
          try:
              destination = os.path.join(location, group)
              if os.path.exists(destination) and not os.path.isdir(destination):
                  raise salt.exceptions.SaltException('Destination "{}" should be directory!'.format(destination))
              if not os.path.exists(destination):
                  os.makedirs(destination)
                  log.debug('Created destination directory for archives: %s', destination)
              else:
                  log.debug('Archives destination directory %s already exists', destination)
          except OSError as err:
              log.error(errf check_destination(self, location, group):
          '''
          Check destination for the archives.
          :return:
          '''
          # Pre-create destination, since rsync will
          # put one file named as group
          try:
              destination = os.path.join(location, group)
              if os.path.exists(destination) and not os.path.isdir(destination):
                  raise salt.exceptions.SaltException('Destination "{}" should be directory!'.format(destination))
              if not os.path.exists(destination):
                  os.makedirs(destination)
                  log.debug('Created destination directory for archives: %s', destination)
              else:
                  log.debug('Archives destination directory %s already exists', destination)
          except OSError as err:
              log.error(err)
docs: Check destination for the archives.
          :return: