              output = cmd.stdout.readline().decode(encoding)
              if output == "" and cmd.poll() is not None:
                  break
              if output:
                  logger.debug("Update output: '%s'", output.strip())
                  print(output.strip())
          retcode = cmd.poll()
          logger.debug("Update returncode: %s", retcode)
          if retcode != 0:
              print("An error occurred during update. return code: {}".format(retcode))
 
</s> remove         logger.debug("Update returncode: %s", retcode)
 </s> add         logger.debug("'%s' returncode: %s", gitcmd, retcode) </s> remove             print("An error occurred during update. return code: {}".format(retcode))
            return

        print("\nPlease restart Faceswap to complete the update.")
 </s> add             msg = "An error occurred during update. return code: {}".format(retcode)
        else:
            msg = "Please restart Faceswap to complete the update."
        logger.info(msg) </s> remove         # Do the update
        print("A new version is available. Updating...")
        cmd = Popen("git pull", shell=True, stdout=PIPE, stderr=STDOUT, bufsize=1)
 </s> add     @staticmethod
    def do_update(encoding):
        """ Update Faceswap """
        logger.info("A new version is available. Updating...")
        gitcmd = "git pull"
        cmd = Popen(gitcmd, shell=True, stdout=PIPE, stderr=STDOUT, bufsize=1) </s> remove         logger.debug("Check output: %s", stdout.decode(encoding))
        logger.debug("Check returncode: %s", retcode)
 </s> add         logger.debug("'%s' output: %s", gitcmd, stdout.decode(encoding))
        logger.debug("'%s' returncode: %s", gitcmd, retcode) </s> remove         cmd = Popen("git remote update && git status -uno", shell=True, stdout=PIPE, stderr=STDOUT)
 </s> add         logger.info("Checking for updates...")
        update = False
        msg = ""
        gitcmd = "git remote update && git status -uno"
        cmd = Popen(gitcmd, shell=True, stdout=PIPE, stderr=STDOUT)
                logger.debug("'%s' output: '%s'", gitcmd, output.strip())
              output = cmd.stdout.readline().decode(encoding)
              if output == "" and cmd.poll() is not None:
                  break
              if output:
                logger.debug("'%s' output: '%s'", gitcmd, output.strip())
                  print(output.strip())
          retcode = cmd.poll()
          logger.debug("Update returncode: %s", retcode)
          if retcode != 0:
              print("An error occurred during update. return code: {}".format(retcode))
keep keep keep keep replace keep keep keep keep keep
 More responsive FaceSwap update code 
lib/gui/menu.py