MCPcopy Create free account
hub / github.com/libgit2/pygit2 / Payload

Class Payload

pygit2/callbacks.py:91–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91class 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
113class RemoteCallbacks(Payload):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…