diff --git a/plugins/swift/swift-async_ b/plugins/swift/swift-async_ index 51d0c737..a39f7298 100755 --- a/plugins/swift/swift-async_ +++ b/plugins/swift/swift-async_ @@ -45,4 +45,6 @@ except IndexError: async_r = requests.get("http://%s:%s/recon/async" \ % (swift_server, os.getenv("SWIFT_OBJECT_PORT", "6000"))) -print "async_pending.value %d" % json.loads(async_r.text)['async_pending'] +async_r = json.loads(async_r.text)['async_pending'] +async_r = int(0 if async_r is None else async_r) +print "async_pending.value %d" % async_r diff --git a/plugins/swift/swift-dispersion b/plugins/swift/swift-dispersion index e512656d..08d10249 100755 --- a/plugins/swift/swift-dispersion +++ b/plugins/swift/swift-dispersion @@ -64,7 +64,7 @@ except IndexError: pass with os.popen("swift-dispersion-report -j %s" \ - % os.getenv("SWIFT_DISPERSION_CONFIG", "/etc/swift/swift.conf")) as report: + % os.getenv("SWIFT_DISPERSION_CONFIG", "/etc/swift/dispersion.conf")) as report: stats = json.load(report) for type_, values in stats.iteritems():