Skip to content

Commit

Permalink
Merge pull request #525 from felixkrohn/docs-examples-prometheus.py-fix
Browse files Browse the repository at this point in the history
/docs/examples/prometheus.py fix
  • Loading branch information
jantman authored Apr 20, 2021
2 parents 645e22d + 073bfc6 commit 596c01c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/examples/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import time
import os

from string import maketrans
from awslimitchecker.checker import AwsLimitChecker
from prometheus_client import start_http_server, Summary, Gauge

Expand All @@ -12,7 +11,7 @@
'Time spent querying aws for limits'
)
gauges = {}
trantab = maketrans(' -.', '___')
trantab = str.maketrans(' -.', '___')


def main():
Expand All @@ -26,7 +25,7 @@ def main():
checkers[region] = AwsLimitChecker(region=region)

start_http_server(port)
for region, checker in checkers.iteritems():
for region, checker in checkers.items():
update(checker, region)
time.sleep(interval)

Expand Down

0 comments on commit 596c01c

Please sign in to comment.