Skip to content

Improve Pyzor client error codes #17

Description

@alexkiro

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions