Fixes #97, error following 'DROP TABLE'.
Following 'DROP TABLE', metadata.py was raising KeyError in line 162, which resulted in cluster conn being terminated. Resolved this with checking if the key (the name of the dropped table) exists.
This commit is contained in:
@@ -159,7 +159,8 @@ class Metadata(object):
|
||||
|
||||
if not cf_results:
|
||||
# the table was removed
|
||||
del keyspace_meta.tables[table]
|
||||
if table in keyspace_meta.tables:
|
||||
del keyspace_meta.tables[table]
|
||||
else:
|
||||
assert len(cf_results) == 1
|
||||
keyspace_meta.tables[table] = self._build_table_metadata(
|
||||
|
||||
Reference in New Issue
Block a user