def gas_pack(self):
        map_type_ext = {"server_js": "js", "html": "html"}
        json_packed = {}
        try:
            with open(self.source_file, "rb") as fr1:
                jsons = json.loads(fr1.read())

                path = os.path.split(self.source_file)[0]
                for j in jsons["files"]:
                    file_name = os.path.join(path, "%s.%s" % (
                        j["name"], map_type_ext[j["type"]]))
                    with open(file_name, "rb") as fr2:
                        file_content = fr2.read()

                    j["source"] = file_content

                new_json = self.source_file % "%s.packed"
                with open(new_json, "wb+") as fw:
                    fw.write(json.dumps(jsons, indent=4))
        except:
            return False
        else:
            return True
dataset/ETHPy150Open tienfuc/gdcmdtools/gdcmdtools/put.py/GDPut.gas_pack/swapped operands of `%`