def load(self): " Load the config " # attempt load try: f_config = open(self.serial_config_file) config = jsonpickle.decode(f_config.read()) self.update(config) f_config.close() except (IOError, ValueError): Message.err("No serialized config found, or error reading config.") return self["local_music"].refresh_album_cache() Message.note("Album cache refreshed")
def cleanup(self): self.config.save() Message.note("Done.")