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

#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run

from json import dumps

def shutdown(config,interinput=None,interoutput=None):
    #check for lingering runtime errors
    #finishing writing log queues to file
    #if none: write clean.start file in config directory
    if(config['Interface']['remember position'] == 0):
        config['Interface']['map'] = '620x540+50+50'
        
    configPath = config['Path']+'\\config\\sirbot\\config'    
    configFile = open(configPath,"wb+")
    configData = dumps(config)
    configFile.write(configData)
    configFile.close()

#perhaps add garbage collector control here?

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

#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run

def shutdown(config,interinput,interoutput):
    #check for lingering runtime errors
    #finishing writing log queues to file
    #if none: write clean.start file in config directory
    pass

#perhaps add garbage collector control here?

Revert "changes to config during runtime are now saved"
Revert "changes to config during runtime are now saved"

This reverts commit e09a780da17bb2f97d20aafc2c007fe3fc3051bb.
