Skip to content

Commit

Permalink
Correct bug causing pva to never be used
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Willemsen committed Dec 9, 2024
1 parent 342ba3c commit ec0bc1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/channel_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(
import global_settings

self.pv_access = pv_access if pv_access is not None else global_settings.DEFAULT_USE_PVA
if pv_access:
if self.pv_access:
P4PWrapper.add_monitor(channel_access.create_pv_with_prefix(pv), self._set_val)
else:
CaChannelWrapper.add_monitor(channel_access.create_pv_with_prefix(pv), self._set_val)
Expand Down Expand Up @@ -107,14 +107,14 @@ def __init__(
import global_settings

self.pv_access = pv_access if pv_access is not None else global_settings.DEFAULT_USE_PVA
if pv_access:
if self.pv_access:
self.ca = P4PWrapper()
else:
self.ca = CaChannelWrapper()
self.default_wait_time = default_wait_time

# Silence CA errors
if pv_access:
if self.pv_access:
P4PWrapper.error_log_function = lambda *a, **kw: None
else:
CaChannelWrapper.error_log_func = lambda *a, **kw: None
Expand Down

0 comments on commit ec0bc1e

Please sign in to comment.