Francesco Romani has uploaded a new change for review. Change subject: vdscli: do not use the warnings module ......................................................................
vdscli: do not use the warnings module Due the possible memory leaks, switch to our new 'devel' logger. Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Signed-off-by: Francesco Romani <from...@redhat.com> --- M lib/vdsm/vdscli.py 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/64117/1 diff --git a/lib/vdsm/vdscli.py b/lib/vdsm/vdscli.py index 22e7bc8..17b6a29 100644 --- a/lib/vdsm/vdscli.py +++ b/lib/vdsm/vdscli.py @@ -21,11 +21,12 @@ from __future__ import absolute_import from __future__ import print_function + +import logging import os import re from six.moves import xmlrpc_client as xmlrpclib import sys -import warnings from xml.parsers.expat import ExpatError from .sslcompat import sslutils @@ -34,6 +35,9 @@ _TRUSTED_STORE_PATH = '/etc/pki/vdsm' ADDRESS = '0' PORT = 54321 + + +_devel = logging.getLogger("devel") def wrap_transport(transport): @@ -136,10 +140,11 @@ server = xmlrpclib.Server('http://%s' % hostPort, transport) return server -warnings.simplefilter("always", category=DeprecationWarning) -warnings.warn( + +_devel.warning( "vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use " - "vdsm.jsonrpcvdscli", DeprecationWarning, stacklevel=2) + "vdsm.jsonrpcvdscli") + if __name__ == '__main__': print('connecting to %s:%s ssl %s ts %s' % ( -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org