def close(self, reason): if self.dqs: prios = self.dqs.close() with open(join(self.dqdir, 'active.json'), 'w') as f: json.dump(prios, f) return self.df.close(reason)
def _saveinfo(self, info): with open(self._infopath(), 'w') as f: json.dump(info, f)