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:
Mik Kocikowski
2014-03-26 02:01:09 -07:00
parent 4e8154305f
commit 50bdeba692

View File

@@ -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(