Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
fix for using from_DSN constructor with dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
eman committed Dec 3, 2016
1 parent f9bd6cc commit 2e8c588
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions influxdb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def _port(self):
def _get_port(self):
return self.__port

@staticmethod
def from_DSN(dsn, **kwargs):
@classmethod
def from_DSN(cls, dsn, **kwargs):
"""Return an instance of :class:`~.InfluxDBClient` from the provided
data source name. Supported schemes are "influxdb", "https+influxdb"
and "udp+influxdb". Parameters for the :class:`~.InfluxDBClient`
Expand Down Expand Up @@ -169,7 +169,7 @@ def from_DSN(dsn, **kwargs):
init_args['port'] = port
init_args.update(kwargs)

return InfluxDBClient(**init_args)
return cls(**init_args)

def switch_database(self, database):
"""Change the client's database.
Expand Down

0 comments on commit 2e8c588

Please sign in to comment.