From f63b58f5b7819073fb086a4415d6ef4ad2bf4fd1 Mon Sep 17 00:00:00 2001 From: Samuel Merritt Date: Mon, 4 Nov 2013 12:28:48 -0800 Subject: [PATCH] Fix deprecation warning. BaseException.message is deprecated; if you have an exception of type Exception (or subclass thereof), then "str(ex)" is the preferred way to get the message. Change-Id: I5b4acf88de538c1ef0f2db4fefaa92699937cd50 --- swift/obj/diskfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/obj/diskfile.py b/swift/obj/diskfile.py index d213d20960..db75aef860 100644 --- a/swift/obj/diskfile.py +++ b/swift/obj/diskfile.py @@ -938,7 +938,7 @@ class DiskFile(object): return read_metadata(source) except Exception as err: self._quarantine(quarantine_filename, - "Exception reading metadata: %s" % err.message) + "Exception reading metadata: %s" % err) def _construct_from_data_file(self, data_file, meta_file): """