From 18ba26fed0dc3771d7d1cb283ca8e19506dd5ea8 Mon Sep 17 00:00:00 2001 From: Ross Davies Date: Tue, 30 Mar 2021 18:13:11 -0700 Subject: [PATCH] Fixed flake8 issues detected on logging changes. --- docs/changelog.rst | 1 + ntnx_api/client.py | 3 ++- ntnx_api/prism.py | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index c265221..f521a75 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,6 +7,7 @@ A log of changes by version and date. :header: "Version", "Date", "Notes" :widths: 10, 10, 60 + "1.1.21", "3/30/2021", "Fixed flake8 warnings for logging changes." "1.1.21", "3/30/2021", "Updated logging to use an environment variable NTNX_API_LOG_LEVEL to dictate stdout logging. Default log level is WARNING" "1.1.20", "3/30/2021", "Resolved issues with metadata functions. Renamed variables in vms tests." "1.1.19", "3/30/2021", "Updated *.get_project and *.get_categories. Added prism.Vm.get_metadata and prism.Host.get_metadata." diff --git a/ntnx_api/client.py b/ntnx_api/client.py index 34c9479..ab0f176 100644 --- a/ntnx_api/client.py +++ b/ntnx_api/client.py @@ -32,6 +32,7 @@ import json import logging import logging.config +import os DOCUMENTATION = r''' name: nutanix_api.client @@ -64,7 +65,7 @@ }, 'handlers': { 'ntnx_api.client': { - 'level':logging_level, + 'level': logging_level, 'class': 'logging.StreamHandler', "formatter": "standard", "stream": "ext://sys.stdout" diff --git a/ntnx_api/prism.py b/ntnx_api/prism.py index 3235576..debba33 100644 --- a/ntnx_api/prism.py +++ b/ntnx_api/prism.py @@ -96,8 +96,8 @@ }, 'handlers': { 'ntnx_api.prism': { - 'level':logging_level, - 'class':'logging.StreamHandler', + 'level': logging_level, + 'class': 'logging.StreamHandler', "formatter": "standard", "stream": "ext://sys.stdout" },