Skip to content

Commit 69b6089

Browse files
committed
Clean up coding style
1 parent 90a7c62 commit 69b6089

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

influxdb_client/client/bucket_api.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,18 @@ def create_bucket(self, bucket=None, bucket_name=None, org_id=None, retention_ru
5757

5858
try:
5959
return self._buckets_service.post_buckets(post_bucket_request=bucket)
60-
except ApiException as ex:
60+
except ApiException:
6161
# Fall back to v1 API if buckets are not supported
6262
database_name = bucket_name if bucket_name is not None else bucket
6363
return self.create_database(database=database_name, retention_rules=retention_rules)
6464

6565
def create_database(self, database=None, retention_rules=None):
6666
"""Create a database at the v1 api (legacy).
67-
67+
6868
:param database_name: name of the new database
6969
:param retention_rules: retention rules array or single BucketRetentionRules
70-
:return: Tuple (response body, status code, header dict)"""
70+
:return: Tuple (response body, status code, header dict)
71+
"""
7172
if database is None:
7273
raise ValueError("Invalid value for `database`, must be defined.")
7374

@@ -122,15 +123,16 @@ def delete_bucket(self, bucket):
122123

123124
try:
124125
return self._buckets_service.delete_buckets_id(bucket_id=bucket_id)
125-
except ApiException as ex:
126+
except ApiException:
126127
return self.delete_database(database=bucket_id)
127128

128129
def delete_database(self, database=None):
129130
"""Delete a database at the v1 api (legacy).
130-
131+
131132
:param database_name: name of the database to delete
132133
:param retention_rules: retention rules array or single BucketRetentionRules
133-
:return: Tuple (response body, status code, header dict)"""
134+
:return: Tuple (response body, status code, header dict)
135+
"""
134136
if database is None:
135137
raise ValueError("Invalid value for `database`, must be defined.")
136138

0 commit comments

Comments
 (0)