mirror of
https://github.com/sprockets/sprockets-influxdb.git
synced 2024-11-14 19:29:29 +00:00
Python 2.7 compatibility
This commit is contained in:
parent
ead27c3942
commit
4548295995
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue