Skip to content

Commit 1ebc62f

Browse files
Artem Savichevwstranger
authored andcommitted
pep8 fixes
1 parent 0f63abb commit 1ebc62f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/collectors/postgres/postgres.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ def collect(self):
109109

110110
for instance in self.config['instances'].keys():
111111
# Get list of databases
112-
#import pdb
113-
#pdb.set_trace()
114112
dbs = self._get_db_names(instance)
115113
if len(dbs) == 0:
116114
self.log.error("I have 0 databases!")
@@ -130,7 +128,8 @@ def collect(self):
130128
for metric_name in set(metrics):
131129
if metric_name not in metrics_registry:
132130
self.log.error(
133-
'metric_name %s not found in metric registry' % metric_name)
131+
'metric_name %s not found in metric registry'
132+
% metric_name)
134133
continue
135134

136135
for dbase in dbs:
@@ -143,11 +142,13 @@ def collect(self):
143142
stat.fetch(self._get_config(instance, 'pg_version'))
144143
for metric, value in stat:
145144
if value is not None:
146-
self.publish("%s.$s" % (instance, metric), value)
145+
self.publish("%s.%s" % (instance, metric),
146+
value)
147147

148-
# Setting multi_db to True will run this query on all known
149-
# databases. This is bad for queries that hit views like
150-
# pg_database, which are shared across databases.
148+
# Setting multi_db to True will run this query on all
149+
# known databases. This is bad for queries that hit
150+
# views like pg_database, which are shared
151+
# across databases.
151152
#
152153
# If multi_db is False, bail early after the first query
153154
# iteration. Otherwise, continue to remaining databases.

0 commit comments

Comments
 (0)