Clean up a couple of deprecated uses of e.message

Using the style from existing statements elsewhere in the file.

Change-Id: I3270d0c69e7446bbfd5bbc784c4e6911a5600478
This commit is contained in:
Pete Zaitcev
2015-02-24 17:47:07 -07:00
parent 923e17b2b8
commit 268e31647d

View File

@@ -850,8 +850,8 @@ swift-ring-builder <builder_file> rebalance [options]
print("An error has occurred during ring validation. Common\n"
"causes of failure are rings that are empty or do not\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
exit(EXIT_ERROR)
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"
"causes of failure are rings that are empty or do not\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
exit(EXIT_ERROR)
print ('Reassigned %d (%.02f%%) partitions. '
@@ -1202,8 +1202,8 @@ def main(arguments=None):
print e
exit(EXIT_ERROR)
except Exception as e:
print 'Problem occurred while reading builder file: %s. %s' % (
argv[1], e.message)
print('Problem occurred while reading builder file: %s. %s' %
(argv[1], e))
exit(EXIT_ERROR)
backup_dir = pathjoin(dirname(argv[1]), 'backups')