docs: def _post_execute(self):
          """
          Should be called when executing the user requested command has been
          completed. It will do some maintenance and write out the final result
          to the todo.txt file.
          """
  
          if self.todolist.dirty:
              # do not archive when the value of the filename is an empty string
              # (i.e. explicitly left empty in the configuration
              if self.do_archive and config().archive():
                  self._archive()
              elif config().archive() and self.backup:
                  archive = _retrieve_archive()[0]
                  self.backup.add_archive(archive)
  
              self._post_archive_action()
  
              if config().keep_sorted():
                  from topydo.commands.SortCommand import SortCommand
                  self._execute(SortCommand, [])
  
              if self.backup:
                  self.backup.save(self.todolist)
  
              self.todofile.write(self.todolist.print_todos())
              self.todolist.dirty = False
  
          self.backup = None