GitterPy icon indicating copy to clipboard operation
GitterPy copied to clipboard

delete method does has problems with json decoding

Open fernand0 opened this issue 2 years ago • 2 comments

I'm testing the delete feature. With the program, the result is:

Unexpected error: <class 'simplejson.errors.JSONDecodeError'>
Unexpected error: Expecting value: line 1 column 1 (char 0)

but if I delete the string .json() from:

def request_process(self, method, api, **kwargs):
    url = GITTER_BASE_URL + api
    return method(url, headers=self.headers, **kwargs).json()

then the method returns:

 <Response [204]>

So, I think the problem is that deleting does not return a value (just the http reply) and the class has problems dealing with this. I can send a patch, if you want.

fernand0 avatar Dec 20 '21 18:12 fernand0

Hi @fernand0

Thank you for reporting an issue, unfortunately, I can't dedicate time to the GitterPy package, and I won't address any fixes/features in the near future.

But, any contributions with fixes/features are appreciated, if you have time/desire, feel free to make a PR.

Thank you, Mike

myusko avatar Dec 21 '21 04:12 myusko

Pull request: https://github.com/myusko/GitterPy/pull/54

fernand0 avatar Dec 27 '21 11:12 fernand0