Change in vdsm[master]: stomp: add an option to create a stomp client

ykaplan at redhat.com ykaplan at redhat.com
Tue May 26 16:19:56 UTC 2015


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 <ykaplan at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yaniv Bronheim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list