Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/hardware/bliss/session.py: 69%

13 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-11-14 02:13 +0000

1#!/usr/bin/env python 

2# -*- coding: utf-8 -*- 

3from bliss.config.static import get_config 

4 

5import logging 

6 

7logger = logging.getLogger(__name__) 

8 

9 

10class BlissSession: 

11 def __init__(self, name): 

12 cfg = get_config() 

13 self._session = cfg.get(name) 

14 

15 try: 

16 self._session.setup() 

17 except Exception: 

18 logger.exception("Warning: Errors occurred during session initialisation") 

19 

20 for k, v in self._session.env_dict.items(): 

21 globals()[k] = v