@POST('^/api/v1/confirm_order')
    @authenticated
    def confirm_order(self, request):
        try:
            def respond(success):
                if success is True:
                    request.write(json.dumps({"success": True}))
                    request.finish()
                else:
                    request.write(json.dumps({"success": False, "reason": success}))
                    request.finish()
            file_name = request.args["id"][0] + ".json"
            file_path = os.path.join(DATA_FOLDER, "store", "contracts", "in progress", file_name)
            with open(file_path, 'r') as filename:
                order = json.load(filename, object_pairs_hook=OrderedDict)
            c = Contract(self.db, contract=order, testnet=self.protocol.testnet)
            if "vendor_order_confirmation" not in c.contract:
                c.add_order_confirmation(self.protocol.blockchain,
                                         request.args["payout_address"][0],
                                         comments=request.args["comments"][0].decode("utf8")
                                         if "comments" in request.args else None,
                                         shipper=request.args["shipper"][0].decode("utf8")
                                         if "shipper" in request.args else None,
                                         tracking_number=request.args["tracking_number"][0].decode("utf8")
                                         if "tracking_number" in request.args else None,
                                         est_delivery=request.args["est_delivery"][0].decode("utf8")
                                         if "est_delivery" in request.args else None,
                                         url=request.args["url"][0].decode("utf8")
                                         if request.args in "url" else None,
                                         password=request.args["password"][0].decode("utf8")
                                         if "password" in request.args else None)
            guid = c.contract["buyer_order"]["order"]["id"]["guid"]
            self.mserver.confirm_order(guid, c).addCallback(respond)
            return server.NOT_DONE_YET
        except Exception, e:
            request.write(json.dumps({"success": False, "reason": e.message}, indent=4))
            request.finish()
            return server.NOT_DONE_YET
dataset/ETHPy150Open OpenBazaar/OpenBazaar-Server/api/restapi.py/OpenBazaarAPI.confirm_order/swapped operands of `in`