예제 #1
0
 def _execute_git_remote_command_subprocess(self, *args, **kwargs):
     """
     This is the entry point for the subprocess that executes git remote commands using pexpect. Args and kwargs are
     passed directly through to self._execute_git_remote_command().
     """
     # Reset signal handlers -- unhandled exceptions will be handled by the main process when the subprocess dies.
     UnhandledExceptionHandler.reset_signal_handlers()
     self._close_unneeded_network_connections()
     self._execute_git_remote_command(*args, **kwargs)
예제 #2
0
    def _execute_git_remote_command_subprocess(self, command, cwd, timeout, log_msg_queue):
        """
        :type command: str
        :type cwd: str|None
        :type timeout: int
        :type log_msg_queue: multiprocessing.queues.Queue

        This is the entry point for the subprocess that executes git remote commands using pexpect. Args and kwargs are
        passed directly through to self._execute_git_remote_command().
        """
        try:
            # Reset signal handlers -- unhandled exceptions will be handled by the main process when the subprocess dies.
            UnhandledExceptionHandler.reset_signal_handlers()
            log_msg_queue.put(('INFO', 'Closing unneeded network connections...', ()))
            self._close_unneeded_network_connections()
            log_msg_queue.put(('INFO', 'Closed network connections, executing git remote command...', ()))
            self._execute_git_remote_command(command, cwd, timeout, log_msg_queue)
        except Exception as exception:
            log_msg_queue.put(('ERROR', 'Exception in _execute_git_remote_command_subprocess {}', (exception,)))
            raise exception