Hello Piotr Kliczewski, Yaniv Bronhaim, Dan Kenigsberg,

I'd like you to do a code review.  Please visit

    https://gerrit.ovirt.org/64258

to review the following change.

Change subject: vdsm: Do not modify warnings filter in a library
......................................................................

vdsm: Do not modify warnings filter in a library

vdsm.vdscli was modifying warnings filter, taking control from the
application importing it. With the old code, there is no way to disable
the warnings - if the application sets a warnings filter, importing
vdscli will override the application filter.

This warnings is highly unwanted, causing user facing warnings each time
you run a vdsClient or hosted-engine command.

This patch removes the wrong filter, returning control to the application
using vdscli. Since warnings are hidden by default, this removes the
unwanted warnings from vdsClient and hosted-engine command line tools.

Change-Id: I6c31508b3279d8ea762c4dfeffeb1348697f5f77
Bug-Url: https://bugzilla.redhat.com/1377069
Signed-off-by: Nir Soffer <nsof...@redhat.com>
Reviewed-on: https://gerrit.ovirt.org/64100
Continuous-Integration: Jenkins CI
Reviewed-by: Simone Tiraboschi <stira...@redhat.com>
Reviewed-by: Dan Kenigsberg <dan...@redhat.com>
Reviewed-by: Yaniv Bronhaim <ybron...@redhat.com>
Reviewed-by: Piotr Kliczewski <piotr.kliczew...@gmail.com>
---
M lib/vdsm/vdscli.py
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/58/64258/1

diff --git a/lib/vdsm/vdscli.py b/lib/vdsm/vdscli.py
index 22e7bc8..552330c 100644
--- a/lib/vdsm/vdscli.py
+++ b/lib/vdsm/vdscli.py
@@ -136,7 +136,6 @@
         server = xmlrpclib.Server('http://%s' % hostPort, transport)
     return server
 
-warnings.simplefilter("always", category=DeprecationWarning)
 warnings.warn(
     "vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use "
     "vdsm.jsonrpcvdscli", DeprecationWarning, stacklevel=2)


-- 
To view, visit https://gerrit.ovirt.org/64258
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c31508b3279d8ea762c4dfeffeb1348697f5f77
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to