Skip to content

Commit

Permalink
Merge pull request #184 from nandakishorepeddi/skip_info
Browse files Browse the repository at this point in the history
Format Debug Log
  • Loading branch information
chandrajr authored Jan 5, 2024
2 parents c70eade + 793dad2 commit 6792761
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion icontrol/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.3.15"
__version__ = "1.3.16"
8 changes: 4 additions & 4 deletions icontrol/authtoken.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def get_auth_providers(self, netloc):

response = requests.get(url, verify=self.verify, proxies=self.proxies)
if not response.ok or not hasattr(response, "json"):
error_message = '%s Unexpected Error: %s for uri: %s\nText: %r' %\
error_message = '%s Unexpected Error: %s for uri: %s Text: %r' %\
(response.status_code,
response.reason,
response.url,
Expand Down Expand Up @@ -155,7 +155,7 @@ def get_new_token(self, netloc):
)
self.attempts += 1
if not response.ok or not hasattr(response, "json"):
error_message = '%s Unexpected Error: %s for uri: %s\nText: %r' %\
error_message = '%s Unexpected Error: %s for uri: %s Text: %r' %\
(response.status_code,
response.reason,
response.url,
Expand All @@ -173,7 +173,7 @@ def get_new_token(self, netloc):
)
except (KeyError, ValueError):
error_message = \
'%s Unparseable Response: %s for uri: %s\nText: %r' %\
'%s Unparseable Response: %s for uri: %s Text: %r' %\
(response.status_code,
response.reason,
response.url,
Expand All @@ -187,7 +187,7 @@ def get_new_token(self, netloc):
)
except iControlUnexpectedHTTPError:
error_message = \
'%s Token already expired: %s for uri: %s\nText: %r' % \
'%s Token already expired: %s for uri: %s Text: %r' % \
(response.status_code,
time.ctime(expiration_bigip),
response.url,
Expand Down
10 changes: 5 additions & 5 deletions icontrol/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ def wrapper(self, RIC_base_uri, **kwargs):
response = method(self, REST_uri, **kwargs)
post_message =\
"RESPONSE::STATUS: %s Content-Type: %s Content-Encoding:"\
" %s\nText: %r" % (response.status_code,
response.headers.get('Content-Type', None),
response.headers.get('Content-Encoding', None),
response.text)
" %s Text: %r" % (response.status_code,
response.headers.get('Content-Type', None),
response.headers.get('Content-Encoding', None),
response.text)
logger.debug(post_message)
if response.status_code not in range(200, 207):
error_message = '%s Unexpected Error: %s for uri: %s\nText: %r' %\
error_message = '%s Unexpected Error: %s for uri: %s Text: %r' %\
(response.status_code,
response.reason,
response.url,
Expand Down

0 comments on commit 6792761

Please sign in to comment.