| Total Complexity | 5 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python3 |
||
| 2 | # -*- coding: utf-8 -*- |
||
| 3 | |||
| 4 | """Generic TCL request object.""" |
||
| 5 | |||
| 6 | from . import tclresult |
||
| 7 | |||
| 8 | |||
| 9 | class TclRequest: |
||
|
|
|||
| 10 | """Generic TCL request object.""" |
||
| 11 | |||
| 12 | def __init__(self): |
||
| 13 | """Populate variables.""" |
||
| 14 | self.uri = "" |
||
| 15 | self.rawmode = False |
||
| 16 | self.response = None |
||
| 17 | self.result = None |
||
| 18 | self.error = None |
||
| 19 | self.success = False |
||
| 20 | |||
| 21 | def get_headers(self): |
||
| 22 | """Return request headers.""" |
||
| 23 | return {} |
||
| 24 | |||
| 25 | def get_params(self): |
||
| 26 | """Return request parameters.""" |
||
| 27 | return {} |
||
| 28 | |||
| 29 | def is_done(self, http_status: int, contents: str): |
||
| 30 | """Check if query is done or needs retry.""" |
||
| 31 | return False |
||
| 32 | |||
| 33 | def get_result(self) -> tclresult.TclResult: |
||
| 34 | """Return Result object.""" |
||
| 35 | return self.result |
||
| 36 |