From c2744caac43586b745c43c37a9c31483f7a126fc Mon Sep 17 00:00:00 2001 From: Samuel Merritt Date: Tue, 8 Apr 2014 11:44:58 -0700 Subject: [PATCH] Fix deprecation warning Accessing BaseException.message spews a warning; we can get the same information with str(err), which does not spew. Change-Id: I67648d53d25522be074a78c44b3ce97dc27d1f07 --- swift/cli/info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/cli/info.py b/swift/cli/info.py index c5cf8daaee..179d5b16aa 100644 --- a/swift/cli/info.py +++ b/swift/cli/info.py @@ -168,7 +168,7 @@ def print_info(db_type, db_file, swift_dir='/etc/swift'): try: info = broker.get_info() except sqlite3.OperationalError as err: - if 'no such table' in err.message: + if 'no such table' in str(err): print "Does not appear to be a DB of type \"%s\": %s" % ( db_type, db_file) raise InfoSystemExit()