Skip to content

Commit

Permalink
Simple update for recent pycodestyle version
Browse files Browse the repository at this point in the history
  • Loading branch information
mohierf committed Apr 15, 2018
1 parent 09e24cc commit 5998257
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions alignak_backend/grafana.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ def get_datasources(self):
"""
headers = {"Authorization": "Bearer " + self.api_key}
try:
response = requests.get(self.scheme + '://' + self.host + ':' + self.port +
'/api/datasources', headers=headers, timeout=10)
url = "%s://%s:%s/api/datasources" % (self.scheme, self.host, self.port)
response = requests.get(url, headers=headers, timeout=10)
except requests.exceptions.SSLError as e:
print("[cron_grafana] SSL connection error to grafana %s: %s" % (self.name, e))
current_app.logger.error("[cron_grafana] SSL connection error to grafana %s "
Expand Down Expand Up @@ -538,8 +538,8 @@ def get_datasources(self):
"name": ds_name,
"type": "graphite",
"access": "proxy",
"url": "http://" + timeserie['graphite_address'] + ":" +
str(timeserie['graphite_port']),
"url": "http://%s:%s" % (timeserie['graphite_address'],
timeserie['graphite_port']),
"basicAuth": False,
"basicAuthUser": "",
"basicAuthPassword": "",
Expand Down
4 changes: 2 additions & 2 deletions alignak_backend/livesynthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ def on_updated_host(updated, original):
if minus is not False:
livesynthesis_db = current_app.data.driver.db['livesynthesis']
live_current = livesynthesis_db.find_one({'_realm': original['_realm']})
if live_current is None or 'not_monitored' in minus or (plus and
'not_monitored' in plus):
if live_current is None or 'not_monitored' in minus \
or (plus and 'not_monitored' in plus):
ls = Livesynthesis()
ls.recalculate()
else:
Expand Down

0 comments on commit 5998257

Please sign in to comment.