|
10 | 10 | from deluge_web_client.types import ParamArgs
|
11 | 11 |
|
12 | 12 |
|
13 |
| -# TODO: remove all print statements |
14 |
| - |
15 |
| - |
16 | 13 | class DelugeWebClient:
|
17 | 14 | HEADERS = {"Content-Type": "application/json", "Accept": "application/json"}
|
18 | 15 | ID = 0
|
@@ -274,7 +271,7 @@ def _upload_helper(
|
274 | 271 | with self.session.post(
|
275 | 272 | self.url, headers=self.HEADERS, json=payload, timeout=timeout
|
276 | 273 | ) as response:
|
277 |
| - self.ID += 1 |
| 274 | + self.ID += 1 |
278 | 275 | if response.ok:
|
279 | 276 | result = response.json()
|
280 | 277 | info_hash = str(result["result"])
|
@@ -597,26 +594,19 @@ def execute_call(
|
597 | 594 | self.url, headers=self.HEADERS, json=payload, timeout=timeout
|
598 | 595 | ) as response:
|
599 | 596 | self.ID += 1
|
600 |
| - print("IN HERE LOWER POST") |
601 |
| - print(response.status_code) |
602 |
| - print(response.ok) |
603 | 597 | if response.ok:
|
604 |
| - print(response.json()) |
605 | 598 | response_json = response.json()
|
606 | 599 | data = Response(
|
607 | 600 | result=response_json.get("result"),
|
608 | 601 | error=self._normalize_exception(response_json.get("error")),
|
609 | 602 | id=response_json.get("id"),
|
610 | 603 | )
|
611 | 604 | if handle_error and data.error:
|
612 |
| - # print('in here') |
613 | 605 | raise DelugeWebClientError(
|
614 | 606 | f"Payload: {payload}, Error: {data.error}"
|
615 | 607 | )
|
616 |
| - # print('returning data') |
617 | 608 | return data
|
618 | 609 | else:
|
619 |
| - # print('in here 2') |
620 | 610 | raise DelugeWebClientError(
|
621 | 611 | f"Failed to execute call. Response code: {response.status_code}. Reason: {response.reason}"
|
622 | 612 | )
|
|
0 commit comments