1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-11-25 19:47:02 +00:00

Fix getenv usage in swift plugins

os.getenv returns a string, not an integer, so using %s will fail if the
variable SWIFT_OBJECT_PORT is set.
This commit is contained in:
Julien Danjou 2013-05-17 10:36:29 +02:00
parent dc75b52a7d
commit 1e1ca5b633
3 changed files with 6 additions and 6 deletions

View file

@ -43,6 +43,6 @@ try:
except IndexError:
pass
replication_r = requests.get("http://%s:%d/recon/replication" \
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", 6000)))
replication_r = requests.get("http://%s:%s/recon/replication" \
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", "6000")))
print "object_replication_time.value %f" % json.loads(replication_r.text)['object_replication_time']