diff options
author | Jeff Lane <jeffrey.lane@canonical.com> | 2016-08-17 22:49:04 -0400 |
---|---|---|
committer | Jeff Lane <jeffrey.lane@canonical.com> | 2016-08-17 22:49:04 -0400 |
commit | 6d2427d1e0e8a628c49faa8be05c540a5696cfd6 (patch) | |
tree | 5862a73dda845f8265d09c1c9a6f4b503d79fb87 /bin | |
parent | 5edc8e86a3270ddc11c219d5c93d37a1c049b1f9 (diff) |
pep8 fixes
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/disk_smart | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/disk_smart b/bin/disk_smart index 61478e2..804b11f 100755 --- a/bin/disk_smart +++ b/bin/disk_smart @@ -272,11 +272,11 @@ def in_progress(current_entries): # LP:1612220 Only check first log entry for status to avoid false triggers # on older interrupted tests that may still show an "in progress" status. statuses = [entry for entry in current_entries - if isinstance(entry, dict) - and 'status' in entry - and entry['number'] == 1 - and (entry['status'] == 'Self-test routine in progress' - or "Self test in progress" in entry['status'])] + if isinstance(entry, + dict) and 'status' in entry and + entry['number'] == 1 and ( + entry['status'] == 'Self-test routine in progress' or + "Self test in progress" in entry['status'])] if statuses: for entry in statuses: logging.debug('%s %s %s %s' % (entry['number'], @@ -400,7 +400,7 @@ def run_smart_test(args, disk, raid_element, raid_type): logging.debug("\t# {}\t{}\t{}\t{}\t{}\t{}".format( log_entry['number'], log_entry['description'], log_entry['status'], log_entry['remaining'], - log_entry['lifetime'], log_entry['lba'])) + log_entry['lifetime'], log_entry['lba'])) return False else: if raid_type == 'none': @@ -461,8 +461,8 @@ def main(): success = True for raid_element in range(0, num_disks): if enable_smart(disk, raid_element, raid_type): - success = (run_smart_test(args, disk, raid_element, raid_type) - and success) + success = (run_smart_test(args, disk, raid_element, + raid_type) and success) else: success = False if success is False: |