Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _sane.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,11 @@ SaneDev_set_option(SaneDevObject *self, PyObject *args)
((char*)v)[d->size - 1] = 0;
Py_DECREF(strobj);
break;
case SANE_TYPE_BUTTON:
case SANE_TYPE_GROUP:
PyErr_SetString(ErrorObject, "SANE_TYPE_BUTTON and SANE_TYPE_GROUP can't be set");
PyErr_SetString(ErrorObject, "SANE_TYPE_GROUP can't be set");
free(v);
return NULL;
case SANE_TYPE_BUTTON:
}

SANE_Int info = 0;
Expand Down
2 changes: 0 additions & 2 deletions sane.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ def __setattr__(self, key, value):
return

opt = d['opt'][key]
if opt.type == _sane.TYPE_BUTTON:
raise AttributeError("Buttons don't have values: " + key)
if opt.type == _sane.TYPE_GROUP:
raise AttributeError("Groups don't have values: " + key)
if not _sane.OPTION_IS_ACTIVE(opt.cap):
Expand Down