-
Notifications
You must be signed in to change notification settings - Fork 4
Adm error handling #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This removes the need to send a separate `cls` before doing `adm` commands.
…ry writes. This forces the user to check for potential errors in the command without incurring a readlines timeout penalty if there are no errors. Also adds example to the readme of how a binary write works.
|
While we are handling the errors, I think it would also be good to take care of the invalid reps number case.
Besides this, I think this looks good. |
|
Actually, having attempted to implement this, I think the third option above (with 0 reps or 5 reps) is actually the least problematic output if someone does not check for error messages. |
@carterturn Thanks for tackling that. I had considered doing something about those error prints, but avoided it as I didn't have a very good idea. What you've implemented is simple and effective. Ultimately, there really shouldn't be reps errors in the binary write, and if there are it will likely be easier for the user to fix their table and re-write the whole thing than try to fix individual commands. I'll fix the typo in the readme then merge. |
This PR has
admrespond withready\r\nbefore listening for the binary read. This allows the user to check for issues in the command, without incurring the timeout penalty during normal operation.It also prevents bugs where erroneous commands did not stop execution of the
admcommand.Finally, I updated the examples in the readme to be python scripts, hopefully making the
addandadmcommands a bit easier to use.