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

Improve Pyzor client error codes #17

Closed
alexkiro opened this Issue Jul 21, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@alexkiro
Contributor

alexkiro commented Jul 21, 2014

We should improve the pyzor client script to return appropriate error codes when the server is for example unreachable. So the result is easily parsed.

For example in case of timeout, the pyzor script does not output anything:

$ pyzor -d ping
2014-07-21 15:23:14,018 WARNING No accounts are setup.  All commands will be executed by the anonymous user.
2014-07-21 15:23:14,018 DEBUG sending: 'Op: ping\nThread: 63596\nPV: 2.1\nUser: anonymous\nTime: 1405945394\nSig: b9e0f69deb13376b4517911e09f01abd526f39e7\n\n'
2014-07-21 15:23:19,024 ERROR ('127.0.0.1', 24441)  TimeoutError: Reading response timed-out.

Or in case the command is not valid:

$ pyzor -d pign
2014-07-21 15:26:53,056 WARNING No accounts are setup.  All commands will be executed by the anonymous user.
2014-07-21 15:26:53,056 ERROR Unknown command: pign

@alexkiro alexkiro added this to the 0.9 milestone Jul 21, 2014

@alexkiro alexkiro self-assigned this Jul 21, 2014

alexkiro added a commit that referenced this issue Aug 28, 2014

Refs. #17. Print errors codes and message on other exceptions.
This includes TimeoutErrors, ProtocolErrors and other general Exceptions.
Also print a message when the user enters a wrong command.

@alexkiro alexkiro closed this Aug 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment