This will only keep the 'log info' in one line, the output for 'rich console'. I have 'force-pushed' to prevent git-history pollution. Oops! I forgot to use same comments :p
'socket.gaierror' is caught when we are unable to resolve the host name into the IP address. 'OSError' is caught when the host is invalid. I have now used the appropriate messages.
Previously, we were registering a new 'session' with the 'manager' before completing the setup: '__init__'. Any exception raised after we registered the 'session' didn't remove the registered session. This will allow the reuse of same 'session_id' because we have already registered the 'session' with this 'session_id', which may possibly be an invalid session because an exception is raised. And 'session_id' variable in 'manager' will not be updated because of this exception. Thus, I have shifted down the session registering part so that it occurs after the completion of session creation.
I have added warning messages so that the attacker can use 'C-c' to cancel the session when used from command line (not from local prompt). And added the message for already handled same exception. I have also changed two warning message color from 'red' to 'yellow', because 'yellow' is being used everywhere in the code.
Exception handling in the output thread was cleaned up and had Windows
platform raise the RawModeExit exception to trigger an exit when
interactive end marker was observed.
- Removed `C-d` loop in `LinuxWriter.close`
- Added double `C-d` routine based on last character written to `LinuxWriter.close`
- Changed upload success message to match size calculations from `rich.progress`.
- Added better file IO test cases (small text, large text, small binary, large binary)
There is a missing argument to the ChannelError constructor - ch (channel). Because of this, many explicitly passed error messages are simply rejected. There is a minor typo correction as well, 'writiers' -> 'writers'.
Socket-based channels now raise ChannelClosed if no connection is active
and a recv/send method is called. Also, the close method no longer
raises an exception if the channel is not active. It is silently ignored
as a NOOP.
Also fixed a tangential problem which arose regarding the group
enumerations which caused a recursive call the enumerate groups
from within the group enumeration.