LENS-1398(incremental): Python client not raising exception in some cases
Project: http://git-wip-us.apache.org/repos/asf/lens/repo Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/d1b43d61 Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/d1b43d61 Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/d1b43d61 Branch: refs/heads/current-release-line Commit: d1b43d615ce950609d0496ad8db1a63813f3042b Parents: a3045fe Author: Rajat Khandelwal <pro...@apache.org> Authored: Mon Mar 27 14:42:38 2017 +0530 Committer: Rajat Khandelwal <rajatgupt...@gmail.com> Committed: Mon Mar 27 14:42:38 2017 +0530 ---------------------------------------------------------------------- contrib/clients/python/lens/client/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lens/blob/d1b43d61/contrib/clients/python/lens/client/main.py ---------------------------------------------------------------------- diff --git a/contrib/clients/python/lens/client/main.py b/contrib/clients/python/lens/client/main.py index 1e9d88f..b1846ad 100644 --- a/contrib/clients/python/lens/client/main.py +++ b/contrib/clients/python/lens/client/main.py @@ -25,7 +25,8 @@ import logging logger = logging.getLogger(__name__) class LensClient(object): - def __init__(self, base_url=None, username="", password="", database=None, conf=None): + def __init__(self, base_url=None, username="", password="", database=None, conf=None, logging_level=logging.INFO): + logging.basicConfig(level=logging_level) if conf and isinstance(conf, string_types) and os.path.exists(conf): if os.path.isdir(conf): conf = os.path.join(conf, 'lens-client-site.xml')