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

Method _get_items

thirdparty/clientform/clientform.py:2128–2145  ·  view source on GitHub ↗
(self, name, target=1)

Source from the content-addressed store, hash-verified

2126 self._single_set_value(value)
2127
2128 def _get_items(self, name, target=1):
2129 all_items = self.get_items(name)
2130 items = [o for o in all_items if not o.disabled]
2131 if len(items) < target:
2132 if len(all_items) < target:
2133 raise ItemNotFoundError(
2134 "insufficient items with name %r" % name)
2135 else:
2136 raise AttributeError(
2137 "insufficient non-disabled items with name %s" % name)
2138 on = []
2139 off = []
2140 for o in items:
2141 if o.selected:
2142 on.append(o)
2143 else:
2144 off.append(o)
2145 return on, off
2146
2147 def _single_set_value(self, value):
2148 assert len(value) == 1

Callers 2

_single_set_valueMethod · 0.95
_multiple_set_valueMethod · 0.95

Calls 3

get_itemsMethod · 0.95
ItemNotFoundErrorClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected