def __init__(self, file, makeObjs=False): self.makeObjs = makeObjs file = File(file, quiet=True) file.backup() file.allow_autoload = True super().__init__(file) self.__dict__['file'] = self._l assert file.ext == 'json' file.backup()
def __init__(self, file, makeObjs=False): self.makeObjs = makeObjs file = File(file, quiet=True) file.mkparents() if not file: file.write("{}") file.backup() file.allow_autoload = True super().__init__(file) self.__dict__['file'] = self._d assert file.ext == 'json' file.backup()