summaryrefslogtreecommitdiff
path: root/bin/swift-drive-audit
diff options
context:
space:
mode:
Diffstat (limited to 'bin/swift-drive-audit')
-rwxr-xr-xbin/swift-drive-audit8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/swift-drive-audit b/bin/swift-drive-audit
index e7926aeab..6c742a483 100755
--- a/bin/swift-drive-audit
+++ b/bin/swift-drive-audit
@@ -46,7 +46,7 @@ def get_devices(device_dir, logger):
except OSError, e:
# If we can't stat the device, then something weird is going on
logger.error("Error: Could not stat %s!" %
- block_device)
+ block_device)
continue
device['major'] = str(os.major(device_num))
device['minor'] = str(os.minor(device_num))
@@ -54,7 +54,7 @@ def get_devices(device_dir, logger):
for line in open('/proc/partitions').readlines()[2:]:
major, minor, blocks, kernel_device = line.strip().split()
device = [d for d in devices
- if d['major'] == major and d['minor'] == minor]
+ if d['major'] == major and d['minor'] == minor]
if device:
device[0]['kernel_device'] = kernel_device
return devices
@@ -127,10 +127,10 @@ if __name__ == '__main__':
mount_point = device[0]['mount_point']
if mount_point.startswith(device_dir):
logger.info("Unmounting %s with %d errors" %
- (mount_point, count))
+ (mount_point, count))
subprocess.call(['umount', '-fl', mount_point])
logger.info("Commenting out %s from /etc/fstab" %
- (mount_point))
+ (mount_point))
comment_fstab(mount_point)
unmounts += 1
if unmounts == 0: