              Windows then assume not running in headless mode """
          if not os.environ.get("DISPLAY", None) and os.name != "nt":
              print("No display detected. GUI mode has been disabled.")
              if platform.system() == "Darwin":
                  print("macOS users need to install XQuartz. "
                        "See https://support.apple.com/en-gb/HT201341")
              exit(1)
  
      def execute_script(self, arguments):
          """ Run the script for called command """
          script = self.import_script()
 
</s> remove             print("No display detected. GUI mode has been disabled.")
 </s> add             logger.warning("No display detected. GUI mode has been disabled.") </s> remove         script = self.import_script()
        process = script(arguments)
        process.process()
 </s> add         log_setup(arguments.loglevel)
        logger.debug("Executing: %s. PID: %s", self.command, os.getpid())
        try:
            script = self.import_script()
            process = script(arguments)
            process.process()
        except KeyboardInterrupt:  # pylint: disable=try-except-raise
            raise
        except SystemExit:
            pass
        except Exception:  # pylint: disable=broad-except
            crash_file = crash_log()
            logger.exception("Got Exception on main handler:")
            logger.critical("An unexpected crash has occurred. Crash report written to %s. "
                            "Please verify you are running the latest version of faceswap "
                            "before reporting", crash_file)

        finally:
            safe_shutdown() </s> remove                 "install the TkInter application.\n\n"
                "You can try:\n"
                "  Anaconda:           conda install tk\n"
                "  Windows/macOS:      Install ActiveTcl Community "
                "Edition from http://www.activestate.com\n"
                "  Ubuntu/Mint/Debian: sudo apt install python3-tk\n"
                "  Arch:               sudo pacman -S tk\n"
                "  CentOS/Redhat:      sudo yum install tkinter\n"
                "  Fedora:             sudo dnf install python3-tkinter\n")
 </s> add                 "install the TkInter application. You can try:")
            logger.info("Anaconda: conda install tk")
            logger.info("Windows/macOS: Install ActiveTcl Community Edition from "
                        "http://www.activestate.com")
            logger.info("Ubuntu/Mint/Debian: sudo apt install python3-tk")
            logger.info("Arch: sudo pacman -S tk")
            logger.info("CentOS/Redhat: sudo yum install tkinter")
            logger.info("Fedora: sudo dnf install python3-tkinter") </s> remove         return bool(self.data.get(frame, list()))
 </s> add         retval = bool(self.data.get(frame, list()))
        logger.trace(retval)
        return retval
                logger.info("macOS users need to install XQuartz. "
                            "See https://support.apple.com/en-gb/HT201341")
              Windows then assume not running in headless mode """
          if not os.environ.get("DISPLAY", None) and os.name != "nt":
              print("No display detected. GUI mode has been disabled.")
              if platform.system() == "Darwin":
                logger.info("macOS users need to install XQuartz. "
                            "See https://support.apple.com/en-gb/HT201341")
                logger.info("macOS users need to install XQuartz. "
                            "See https://support.apple.com/en-gb/HT201341")
              exit(1)
  
      def execute_script(self, arguments):
          """ Run the script for called command """
          script = self.import_script()
keep keep keep keep replace replace keep keep keep keep keep
 Logging (#541)

* Convert prints to logger. Further logging improvements. Tidy  up

* Fix system verbosity. Allow SystemExit

* Fix reload extract bug

* Child Traceback handling

* Safer shutdown procedure

* Add shutdown event to queue manager

* landmarks_as_xy > property. GUI notes + linting. Aligner bugfix

* fix FaceFilter. Enable nFilter when no Filter is supplied

* Fix blurry face filter

* Continue on IO error. Better error handling

* Explicitly print stack trace tocrash log

* Windows Multiprocessing bugfix

* Add git info and conda version to crash log

* Windows/Anaconda mp bugfix

* Logging fixes for training 
lib/cli.py