Merge "Clean up a couple of deprecated uses of e.message"

This commit is contained in:
Jenkins
2015-02-25 13:09:46 +00:00
committed by Gerrit Code Review

View File

@@ -850,8 +850,8 @@ swift-ring-builder <builder_file> rebalance [options]
print("An error has occurred during ring validation. Common\n" print("An error has occurred during ring validation. Common\n"
"causes of failure are rings that are empty or do not\n" "causes of failure are rings that are empty or do not\n"
"have enough devices to accommodate the replica count.\n" "have enough devices to accommodate the replica count.\n"
"Original exception message:\n %s" % e.message "Original exception message:\n %s" %
) (e,))
print '-' * 79 print '-' * 79
exit(EXIT_ERROR) exit(EXIT_ERROR)
if not (parts or options.force): if not (parts or options.force):
@@ -876,8 +876,8 @@ swift-ring-builder <builder_file> rebalance [options]
print("An error has occurred during ring validation. Common\n" print("An error has occurred during ring validation. Common\n"
"causes of failure are rings that are empty or do not\n" "causes of failure are rings that are empty or do not\n"
"have enough devices to accommodate the replica count.\n" "have enough devices to accommodate the replica count.\n"
"Original exception message:\n %s" % e.message "Original exception message:\n %s" %
) (e,))
print '-' * 79 print '-' * 79
exit(EXIT_ERROR) exit(EXIT_ERROR)
print ('Reassigned %d (%.02f%%) partitions. ' print ('Reassigned %d (%.02f%%) partitions. '
@@ -1202,8 +1202,8 @@ def main(arguments=None):
print e print e
exit(EXIT_ERROR) exit(EXIT_ERROR)
except Exception as e: except Exception as e:
print 'Problem occurred while reading builder file: %s. %s' % ( print('Problem occurred while reading builder file: %s. %s' %
argv[1], e.message) (argv[1], e))
exit(EXIT_ERROR) exit(EXIT_ERROR)
backup_dir = pathjoin(dirname(argv[1]), 'backups') backup_dir = pathjoin(dirname(argv[1]), 'backups')