Commit c6e5468e authored by Marco Buttu's avatar Marco Buttu
Browse files

When a container is not available, catch the exception and look for the others

parent 25a59810
Loading
Loading
Loading
Loading
+17 −10
Original line number Diff line number Diff line
@@ -19,21 +19,28 @@ while True:
            components = []
            client = PySimpleClient()
            for receiver in receivers:
                try:
                    component = client.getComponent('RECEIVERS/' + receiver)
                    components.append(component)

        except Exception:
                except:
                    pass
        except KeyboardInterrupt:
            logging.info('program closed by the user')
            raise
        try:

            for component in components:
                temp_obj = component._get_cryoTemperatureLNA()
                value, comp = temp_obj.get_sync()
                name = component._get_name().split('/')[-1]
                logging.info('  %s%.2f' % (name.ljust(22), value))
        except KeyboardInterrupt:
            logging.info('program closed by the user')
            raise
        except:
            pass
        finally:
            try:
                if getManager():
                    client.disconnect()
            except:
                logging.error('can not disconnect the client')

    time.sleep(180)
    time.sleep(60)