summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Patel <abhidgreat8394@gmail.com>2019-04-23 19:39:50 -0700
committerAbhishek Patel <abhidgreat8394@gmail.com>2019-04-23 19:39:50 -0700
commit8390fa8ec6c019b3403b05287392e7a517c71963 (patch)
tree5e9fd95b4adaaf444862e96b168ef0469af335df
parent53b2db53a9b91183e8828f138ca3d64dd601584c (diff)
downloadoauthlib-8390fa8ec6c019b3403b05287392e7a517c71963.tar.gz
refactor to get_debug
- Oauthlib's debug mode can be checked with method
-rw-r--r--oauthlib/__init__.py2
-rw-r--r--oauthlib/common.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/oauthlib/__init__.py b/oauthlib/__init__.py
index 25132f0..0e413bc 100644
--- a/oauthlib/__init__.py
+++ b/oauthlib/__init__.py
@@ -26,7 +26,7 @@ def set_debug(debug_val):
global _DEBUG
_DEBUG = debug_val
-def get_debug_flag():
+def get_debug():
"""Get debug mode value.
:return: `True` if debug mode is on, `False` otherwise
diff --git a/oauthlib/common.py b/oauthlib/common.py
index ea5bfe7..5aeb015 100644
--- a/oauthlib/common.py
+++ b/oauthlib/common.py
@@ -14,7 +14,7 @@ import logging
import re
import sys
import time
-from . import get_debug_flag
+from . import get_debug
try:
from secrets import randbits
@@ -436,7 +436,7 @@ class Request(object):
raise AttributeError(name)
def __repr__(self):
- if not get_debug_flag():
+ if not get_debug():
return "<oauthlib.Request SANITIZED>"
body = self.body
headers = self.headers.copy()