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
This commit is contained in:
parent
7060355988
commit
c2744caac4
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user