summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorStefan Majewsky <stefan.majewsky@sap.com>2016-10-18 15:56:54 +0200
committerStefan Majewsky <stefan.majewsky@sap.com>2016-10-19 12:14:11 +0200
commit9d12575102556d6d24a5498d79857e0d5de148bd (patch)
treeefdd3fac5eb31549ddf1768b971f86d948559700 /bin
parent539c3d417c97cc007248473ca0a052f392d1eb19 (diff)
downloadswift-9d12575102556d6d24a5498d79857e0d5de148bd.tar.gz
swift-recon-cron: do not get confused by files in /srv/node
swift-recon-cron looks at the drives mounted in directories below /srv/node, but before this commit, it tried to call listdir() on everything in this directory, even if it is not a directory. Change-Id: Id281352f7ab6ecb520eb00f3649873d8c8678608 Signed-off-by: Stefan Majewsky <stefan.majewsky@sap.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/swift-recon-cron2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/swift-recon-cron b/bin/swift-recon-cron
index 8b3450b1a..24246270c 100755
--- a/bin/swift-recon-cron
+++ b/bin/swift-recon-cron
@@ -30,6 +30,8 @@ def get_async_count(device_dir, logger):
async_count = 0
for i in os.listdir(device_dir):
device = os.path.join(device_dir, i)
+ if not os.path.isdir(device):
+ continue
for asyncdir in os.listdir(device):
# skip stuff like "accounts", "containers", etc.
if not (asyncdir == ASYNCDIR_BASE or