Merge "swift-recon-cron: do not get confused by files in /srv/node"

This commit is contained in:
Zuul 2018-04-13 04:14:31 +00:00 committed by Gerrit Code Review
commit 0bc52a6036

View File

@ -29,6 +29,8 @@ def get_async_count(device_dir, logger):
async_count = 0 async_count = 0
for i in os.listdir(device_dir): for i in os.listdir(device_dir):
device = os.path.join(device_dir, i) device = os.path.join(device_dir, i)
if not os.path.isdir(device):
continue
for asyncdir in os.listdir(device): for asyncdir in os.listdir(device):
# skip stuff like "accounts", "containers", etc. # skip stuff like "accounts", "containers", etc.
if not (asyncdir == ASYNCDIR_BASE or if not (asyncdir == ASYNCDIR_BASE or