diff --git a/phabricator/conduit.py b/phabricator/conduit.py --- a/phabricator/conduit.py +++ b/phabricator/conduit.py @@ -11,6 +11,7 @@ import json import os import time +import warnings import urllib3 @@ -82,8 +83,14 @@ if self._connection is None: self._connection = urllib3.PoolManager(ca_certs=self._ca_certs) try: - response = self._connection.request( - 'POST', url, headers=headers, fields=req_data, timeout=timeout) + with warnings.catch_warnings(): + if not self._ca_certs: + # ignore the urllib3 certificate verification warnings + warnings.simplefilter( + 'ignore', urllib3.exceptions.InsecureRequestWarning) + response = self._connection.request( + 'POST', url, headers=headers, fields=req_data, + timeout=timeout) except urllib3.exceptions.HTTPError as ex: errno = -1 if ex.args and util.safehasattr(ex.args[0], 'errno'): diff --git a/tests/test-check-code-hg.t b/tests/test-check-code-hg.t --- a/tests/test-check-code-hg.t +++ b/tests/test-check-code-hg.t @@ -92,7 +92,7 @@ Skipping ctreemanifest/manifest_ptr.h it has no-che?k-code (glob) Skipping ctreemanifest/treemanifest.cpp it has no-che?k-code (glob) Skipping ctreemanifest/treemanifest.h it has no-che?k-code (glob) - phabricator/conduit.py:15: + phabricator/conduit.py:16: > import urllib3 don't use urllib, use util.urlreq/util.urlerr Skipping tests/conduithttp.py it has no-che?k-code (glob)