def handle_deploy(self, handle, connection, match, data, hdr):
        try:
            _log.analyze(self.node.id, "+", data)
            if 'app_info' not in data:
                kwargs = {}
                # Supply security verification data when available
                if "sec_credentials" in data:
                    kwargs['credentials'] = data['sec_credentials']
                    if "sec_sign" in data:
                        kwargs['content'] = {
                            'file': data["script"],
                            'sign': {h: s.decode('hex_codec') for h, s in data['sec_sign'].iteritems()}}
                app_info, errors, warnings = compiler.compile(data["script"], filename=data["name"],
                        verify=data["check"] if "check" in data else True, **kwargs)
                if errors:
                    if any([e['reason'].startswith("401:") for e in errors]):
                        _log.error("Security verification of script failed")
                        self.send_response(handle, connection, None, status=calvinresponse.UNAUTHORIZED)
                    else:
                        _log.exception("Compilation failed")
                        self.send_response(handle, connection, json.dumps({'errors': errors, 'warnings': warnings}),
                                            status=calvinresponse.BAD_REQUEST)
                    return
            else:
                # Supplying app_info is for backward compatibility hence abort if node configured security
                # Main user is csruntime when deploying script at the same time and some tests used
                # via calvin.Tools.deployer (the Deployer below is the new in appmanager)
                # TODO rewrite these users to send the uncompiled script as cscontrol does.
                if security_needed_check():
                    _log.error("Can't combine compiled script with runtime having security")
                    self.send_response(handle, connection, None, status=calvinresponse.UNAUTHORIZED)
                    return
                app_info = data['app_info']
                errors = [""]
                warnings = [""]
            _log.analyze(self.node.id, "+ COMPILED", {'app_info': app_info, 'errors': errors, 'warnings': warnings})
            d = Deployer(deployable=app_info, deploy_info=data["deploy_info"] if "deploy_info" in data else None,
                         node=self.node, name=data["name"] if "name" in data else None,
                         credentials=data["sec_credentials"] if "sec_credentials" in data else None,
                         verify=data["check"] if "check" is data else True,
                         cb=CalvinCB(self.handle_deploy_cb, handle, connection))
            _log.analyze(self.node.id, "+ Deployer instanciated", {})
            d.deploy()
            _log.analyze(self.node.id, "+ DEPLOYING", {})
        except Exception as e:
            _log.exception("Deployer failed")
            self.send_response(handle, connection, json.dumps({'errors': errors, 'warnings': warnings,
                                                                'exception': str(e)}),
                                status=calvinresponse.BAD_REQUEST if errors else calvinresponse.INTERNAL_ERROR)
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/calvincontrol.py/CalvinControl.handle_deploy/operator `in` -> `is`