Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a23e46c

Browse files
author
aviau
committed
Added default error code to InfluxDBClientError (Closes influxdata#159)
1 parent 4be0d6a commit a23e46c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

influxdb/influxdb08/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626

2727
class InfluxDBClientError(Exception):
28-
"Raised when an error occurs in the request"
29-
def __init__(self, content, code):
28+
"""Raised when an error occurs in the request"""
29+
def __init__(self, content, code=-1):
3030
super(InfluxDBClientError, self).__init__(
3131
"{0}: {1}".format(code, content))
3232
self.content = content

0 commit comments

Comments
 (0)