diff --git a/secop/params.py b/secop/params.py index f32068d..40904a6 100644 --- a/secop/params.py +++ b/secop/params.py @@ -139,8 +139,11 @@ class Parameter(Accessible): datatype.setProperty('unit', unit) super(Parameter, self).__init__(**kwds) - if self.readonly and self.initwrite: - raise ProgrammingError('can not have both readonly and initwrite!') + if self.initwrite: + if self.readonly: + raise ProgrammingError('can not have both readonly and initwrite!') + if not self.poll: + raise ProgrammingError('only polled parameters can have initwrite!') if self.constant is not None: self.properties['readonly'] = True