File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- from recorder .io import yaml_load
1+ from recorder .io import yaml_dump , yaml_load
22from recorder .device import Device , DEVICE_CLASSES
33
44from typing import List
55from pathlib import Path
66
77DEFAULT_CONFIG_PATH = Path .cwd () / 'python-recorder.yaml'
88
9- DEFAULT_OUTPUT_FOLDER = Path .cwd () / 'recordings'
9+ DEFAULT_OUTPUT_FOLDER = Path .cwd () / 'recordings'
1010
1111
1212class Config (dict ):
@@ -46,11 +46,17 @@ def devices(
4646 f'{ list (DEVICE_CLASSES .keys ())} '
4747 )
4848 for index , device_config in _devices .items ():
49- devices .append (
50- device_class (
51- index = index ,
52- output_folder = output_folder ,
53- config = device_config ,
49+ try :
50+ devices .append (
51+ device_class (
52+ index = index ,
53+ output_folder = output_folder ,
54+ config = device_config ,
55+ )
5456 )
55- )
57+ except Exception as e :
58+ raise RuntimeError (
59+ f"Could not initialize { str (device_class )} { index } with "
60+ f"config:\n { yaml_dump (device_config )} \n { str (e )} "
61+ ) from e
5662 return devices
You can’t perform that action at this time.
0 commit comments