-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6508954
commit 121906a
Showing
2 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
__email__ = '[email protected], [email protected], [email protected]' | ||
|
||
import re | ||
import threading | ||
from moler.device.textualdevice import TextualDevice | ||
from moler.device.unixlocal import UnixLocal | ||
from moler.device.proxy_pc2 import ProxyPc2, PROXY_PC | ||
|
@@ -388,10 +389,11 @@ def on_connection_made(self, connection): | |
self._detect_after_open_prompt(self._set_after_open_prompt) | ||
|
||
def _set_after_open_prompt(self, event): | ||
current_thread = threading.current_thread() | ||
occurrence = event.get_last_occurrence() | ||
prompt = occurrence['groups'][0].rstrip() | ||
state = self._get_current_state() | ||
self.logger.info(f"UnixRemote2 for state '{state}' new prompt '{prompt}' reverse_state_prompts_dict: '{self._reverse_state_prompts_dict}'.") | ||
self.logger.info(f"UnixRemote2 for state '{state}' new prompt '{prompt}' reverse_state_prompts_dict: '{self._reverse_state_prompts_dict}' Current thread: {current_thread.name}, ID: {current_thread.ident}.") | ||
with self._state_prompts_lock: | ||
old_prompt = self._state_prompts.get(state, None) | ||
prompt = re.escape(prompt) | ||
|