Spanni26 / pyHPSU

Python Script to read and send commands to a Rotex HPSU
26 stars 15 forks source link

OUTPUT_TYPE is never read from config #57

Closed ewirch closed 1 year ago

ewirch commented 1 year ago

https://github.com/Spanni26/pyHPSU/blob/3e0565674a132cff325a6e425e41d88fa5049ca0/pyHPSU.py#L172 Code line 30 always initializes OUTPUT_TYPE to JSON:

output_type = "JSON"

This way

        if output_type=="" and config.has_option('PYHPSU','OUTPUT_TYPE'):
            output_type=config['PYHPSU']['OUTPUT_TYPE']

if always evaluates to false, and output_type is never taken from config.