| 89 | |
| 90 | |
| 91 | class Payload: |
| 92 | repository: Callable | None |
| 93 | remote: Callable | None |
| 94 | clone_options: Any |
| 95 | |
| 96 | def __init__(self, **kw: object) -> None: |
| 97 | for key, value in kw.items(): |
| 98 | setattr(self, key, value) |
| 99 | self._stored_exception = None |
| 100 | |
| 101 | def check_error(self, error_code: int) -> None: |
| 102 | if error_code == C.GIT_EUSER: |
| 103 | assert self._stored_exception is not None |
| 104 | raise self._stored_exception |
| 105 | elif self._stored_exception is not None: |
| 106 | # A callback mapped to a C function returning void |
| 107 | # might still have raised an exception. |
| 108 | raise self._stored_exception |
| 109 | |
| 110 | check_error(error_code) |
| 111 | |
| 112 | |
| 113 | class RemoteCallbacks(Payload): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…