Updates the ProgressBar to a new value.

def update(self, value=None, force=False, **kwargs):
        'Updates the ProgressBar to a new value.'
        if self.start_time is None:
            self.start()
            return self.update(value, force=force, **kwargs)

        if value is not None and value is not base.UnknownLength:
            if self.max_value is base.UnknownLength:
                # Can't compare against unknown lengths so just update
                pass
            elif self.min_value <= value <= self.max_value:  # pragma: no cover
                # Correct value, let's accept
                pass
            elif self.max_error:
                raise ValueError(
                    'Value %s is out of range, should be between %s and %s'
                    % (value, self.min_value, self.max_value))
            else:
                self.max_value = value

            self.previous_value = self.value
            self.value = value

        minimum_update_interval = self._MINIMUM_UPDATE_INTERVAL
        delta = timeit.default_timer() - self._last_update_timer
        if delta < minimum_update_interval and not force:
            # Prevent updating too often
            return

        # Save the updated values for dynamic messages
        for key in kwargs:
            if key in self.dynamic_messages:
                self.dynamic_messages[key] = kwargs[key]
            else:
                raise TypeError(
                    'update() got an unexpected keyword ' +
                    'argument {0!r}'.format(key))

        if self._needs_update() or force:
            self.updates += 1
            ResizableMixin.update(self, value=value)
            ProgressBarBase.update(self, value=value)
            StdRedirectMixin.update(self, value=value)

            # Only flush if something was actually written
            self.fd.flush()