Yeela Kaplan has posted comments on this change. Change subject: stomp: add an option to create a stomp client ......................................................................
Patch Set 9: (2 comments) https://gerrit.ovirt.org/#/c/38491/9/vdsm/clientIF.py File vdsm/clientIF.py: Line 449: def createStompClient(self, client_socket): Line 450: try: Line 451: json_binding = self.bindings['jsonrpc'] Line 452: except KeyError: Line 453: raise Exception("json rpc server is not available") > not better to check "if config.getboolean('vars', 'jsonrpc_enable')" ?? Please take a look at '_prepareJSONRPCBinding', you will see that fulfilment of this condition is not enough. The binding's creation depends on the imports success. Line 454: reactor = json_binding.reactor Line 455: stompClient = reactor.createClient(client_socket) Line 456: if stompClient is None: Line 457: raise Exception("Failed to create a stomp client") Line 453: raise Exception("json rpc server is not available") Line 454: reactor = json_binding.reactor Line 455: stompClient = reactor.createClient(client_socket) Line 456: if stompClient is None: Line 457: raise Exception("Failed to create a stomp client") > could you be more specific with the exceptions? you can raise StompError or Done Line 458: else: Line 459: return stompClient Line 460: Line 461: -- To view, visit https://gerrit.ovirt.org/38491 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ad4c79130c0ca1c4a5bd01343eafd3d8bf36231 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan <[email protected]> Gerrit-Reviewer: Dima Kuznetsov <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Yaniv Bronheim <[email protected]> Gerrit-Reviewer: Yeela Kaplan <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
