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

Method set_single

thirdparty/clientform/clientform.py:1967–1981  ·  view source on GitHub ↗

Deprecated: set the selection of the single item in this control. Raises ItemCountError if the control does not contain only one item. by_label argument is ignored, and included only for backwards compatibility.

(self, selected, by_label=None)

Source from the content-addressed store, hash-verified

1965 self._set_selected_state(item, not item.selected)
1966
1967 def set_single(self, selected, by_label=None):
1968 """Deprecated: set the selection of the single item in this control.
1969
1970 Raises ItemCountError if the control does not contain only one item.
1971
1972 by_label argument is ignored, and included only for backwards
1973 compatibility.
1974
1975 """
1976 deprecation(
1977 "control.items[0].selected = <boolean>")
1978 if len(self.items) != 1:
1979 raise ItemCountError(
1980 "'%s' is not a single-item control" % self.name)
1981 self._set_selected_state(self.items[0], selected)
1982
1983 def get_item_disabled(self, name, by_label=False, nr=None):
1984 """Get disabled state of named list item in a ListControl."""

Callers

nothing calls this directly

Calls 3

_set_selected_stateMethod · 0.95
deprecationFunction · 0.85
ItemCountErrorClass · 0.85

Tested by

no test coverage detected