'Write the configuration to the config file in the state dir as specified in the config.'

def write(self):

    if (not os.path.exists(self.get_state_dir())):
        os.makedirs(self.get_state_dir())
    with open(os.path.join(self.get_state_dir(), FILENAME), 'w') as outfile:
        self.config.write(outfile=outfile)
