MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / _closeiter

Class _closeiter

thirdparty/bottle/bottle.py:3026–3039  ·  view source on GitHub ↗

This only exists to be able to attach a .close method to iterators that do not support attribute assignment (most of itertools).

Source from the content-addressed store, hash-verified

3024
3025
3026class _closeiter(object):
3027 """ This only exists to be able to attach a .close method to iterators that
3028 do not support attribute assignment (most of itertools). """
3029
3030 def __init__(self, iterator, close=None):
3031 self.iterator = iterator
3032 self.close_callbacks = makelist(close)
3033
3034 def __iter__(self):
3035 return iter(self.iterator)
3036
3037 def close(self):
3038 for func in self.close_callbacks:
3039 func()
3040
3041
3042class ResourceManager(object):

Callers 2

_castMethod · 0.85
static_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…