code: def update_progress(self, complete=False):
          
          if self.progressbar:
              try:
                  self.bar.update(self.transfered)
              except Exception as e:
                  logger.debug("{0}: {1}, {2} exceeds memsize {3}".format(
                                   self.remote_addr,
                                   e,
                                   self.transfered,
                                   self.max_size))
              if complete:
                  self.bar.update(self.max_size)
                  self.bar.finish()
          else:
              percent = int(100 * float(self.transfered) / float(self.max_size))
              # printe a message at 10%, 20%, etc...
              if percent % 10 == 0:
                  if self.progress != percent:
                      logger.info("{0}: capture {1}% complete".format(
                                  self.remote_addr, percent))
                      self.progress = percent
docs: Logs capture progress
  
          :type complete: bool
          :params complete: toggle to finish ncurses progress bar