cki-project / sktm

"Sonic Kernel Testing Manager" - a job scheduler for skt
GNU General Public License v2.0
0 stars 6 forks source link

Refactor patchwork.py #38

Open spbnick opened 6 years ago

spbnick commented 6 years ago

The sktm/patchwork.py needs refactoring as it's hard to understand, use and maintain. Some ideas include:

More ideas are welcome!

spbnick commented 6 years ago

Also, rename the classes to make more sense. E.g. Patchwork for the base class, PatchworkXMLRPC for XML RPC interface, and PatchworkREST for the REST API.

veruu commented 6 years ago

Note to self: get_patch_by_id for PW2 raises an exception when it can't get the data needed, while PW1just logs that it couldn't get the data and returns None. We should throw the exception in both cases, and this would also allow us to remove the checks for no patch returned elsewhere.