A decorator to add a sanity check to ConnectionResource methods.
(meth)
| 12 | |
| 13 | |
| 14 | def guarded(meth): |
| 15 | """A decorator to add a sanity check to ConnectionResource methods.""" |
| 16 | |
| 17 | @functools.wraps(meth) |
| 18 | def _check(self, *args, **kwargs): |
| 19 | self._check_conn_validity(meth.__name__) |
| 20 | return meth(self, *args, **kwargs) |
| 21 | |
| 22 | return _check |
| 23 | |
| 24 | |
| 25 | class ConnectionResource: |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…