@@ -43,21 +43,30 @@ def merge_profiles(self, profile: "Profile_"):
4343 src_profile = deepcopy (self )
4444
4545 for guid , device in profile .devices .items ():
46+ _logger .debug (f"Handling { guid = } and { device = } " )
4647 if guid not in src_profile .devices :
4748 # If the device is not in the current profile, deepcopy the entire device
49+ _logger .debug (f"Device { guid = } not found so adding whole device" )
4850 src_profile .devices [guid ] = deepcopy (device )
4951 else :
5052 # If the device exists in the current profile, merge inputs
5153 existing_device = src_profile .devices [guid ]
54+ _logger .debug (f"Existing device is { existing_device = } " )
5255 for input_type , inputs in device .inputs .items ():
56+ _logger .debug (f"Processing { input_type } and { inputs = } " )
5357 for input_key , input_ in inputs .items ():
58+ _logger .debug (f"Processing { input_key } and { input_ = } " )
5459 if input_key not in existing_device .inputs [input_type ]:
60+ _logger .debug (
61+ f"Input key not found, so adding whole key { input_key = } "
62+ )
5563 # If the input is not in the existing device, deepcopy the input
5664 existing_device .inputs [input_type ][input_key ] = deepcopy (
5765 input_
5866 )
5967 else :
6068 # If the input exists, merge modifiers
69+ _logger .debug (f"Input key exists { input_key = } " )
6170 existing_input = existing_device .inputs [input_type ][
6271 input_key
6372 ]
0 commit comments