codekingpro/portable-devtools
114k
1"""2 oauthlib3 ~~~~~~~~4 5 A generic, spec-compliant, thorough implementation of the OAuth6 request-signing logic.7 8 :copyright: (c) 2019 by The OAuthlib Community9 :license: BSD, see LICENSE for details.10"""11import logging12from logging import NullHandler13 14__author__ = 'The OAuthlib Community'15__version__ = '3.2.2'16 17logging.getLogger('oauthlib').addHandler(NullHandler())18 19_DEBUG = False20 21def set_debug(debug_val):22 """Set value of debug flag23 24 :param debug_val: Value to set. Must be a bool value.25 """26 global _DEBUG27 _DEBUG = debug_val28 29def get_debug():30 """Get debug mode value. 31 32 :return: `True` if debug mode is on, `False` otherwise33 """34 return _DEBUG 35 