Nir Soffer has uploaded a new change for review.

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 remove the wrong filter, returning control to the application
using vdscli. Since warnings hare hidden by default, this remove 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>
---
M lib/vdsm/vdscli.py
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/64100/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/64100
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c31508b3279d8ea762c4dfeffeb1348697f5f77
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@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