bug fix remote lenght
This commit is contained in:
@@ -315,8 +315,11 @@ class node:
|
||||
|
||||
|
||||
def _setup_interact_environment(self, debug=False, logger=None, async_mode=False):
|
||||
try:
|
||||
size = re.search('columns=([0-9]+).*lines=([0-9]+)',str(os.get_terminal_size()))
|
||||
self.child.setwinsize(int(size.group(2)),int(size.group(1)))
|
||||
except OSError:
|
||||
pass
|
||||
if logger:
|
||||
port_str = f":{self.port}" if self.port and self.protocol not in ["ssm", "kubectl", "docker"] else ""
|
||||
logger("success", f"Connected to {self.unique} at {self.host}{port_str} via: {self.protocol}")
|
||||
|
||||
@@ -375,7 +375,9 @@ class NodeServicer(connpy_pb2_grpc.NodeServiceServicer):
|
||||
|
||||
asyncio.run(n._async_interact_loop(remote_stream, resize_callback, copilot_handler=remote_copilot_handler))
|
||||
except Exception as e:
|
||||
pass
|
||||
import traceback
|
||||
print(f"[ERROR in run_async_loop] {e}")
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
n._teardown_interact_environment()
|
||||
response_queue.put(None) # Signal EOF
|
||||
|
||||
Reference in New Issue
Block a user