Python 2.7 compatibility

This commit is contained in:
Gavin M. Roy 2016-09-23 11:40:23 -04:00
parent ead27c3942
commit 4548295995

View file

@ -30,6 +30,13 @@ LOGGER = logging.getLogger(__name__)
REQUEST_DATABASE = 'sprockets_influxdb.database'
USER_AGENT = 'sprockets-influxdb/v{}'.format(__version__)
try:
TimeoutError
except NameError: # Python 2.7 compatibility
class TimeoutError(Exception):
pass
_base_tags = {}
_base_url = 'http://localhost:8086/write'
_credentials = None, None