From dc0f074a6536d0c73bec10b09d4b75fdb3fc2108 Mon Sep 17 00:00:00 2001 From: x03daop Date: Wed, 1 Nov 2017 12:32:30 +0100 Subject: [PATCH] Closedown --- script/local.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/script/local.py b/script/local.py index b0b8d684..b844fa49 100644 --- a/script/local.py +++ b/script/local.py @@ -214,10 +214,13 @@ def append_diag_datasets(parent = None): parent = get_exec_pars().group group = parent + "attrs/" for f in diag_channels: - x = f.read() - if x is None: - x = '' if (type(f) is ch.psi.pshell.epics.ChannelString) else float('nan') - append_dataset(group+get_diag_name(f), x) + try: + x = f.read() + if x is None: + x = '' if (type(f) is ch.psi.pshell.epics.ChannelString) else float('nan') + append_dataset(group+get_diag_name(f), x) + except: + log("Error sampling " + str(get_diag_name(f)) + ": " + str(sys.exc_info()[1])) def wait_beam():