Browse files

Regenerate thrift code using version 0.9

  • Loading branch information...
1 parent 4b8741c commit 903dbd310a5b5c4734a398169482222e5225651e @hannosch hannosch committed Nov 10, 2012
Showing with 84 additions and 87 deletions.
  1. +80 −83 pycassa/cassandra/Cassandra.py
  2. +2 −2 pycassa/cassandra/constants.py
  3. +2 −2 pycassa/cassandra/ttypes.py
View
163 pycassa/cassandra/Cassandra.py
@@ -1,15 +1,12 @@
#
-# Autogenerated by Thrift Compiler (0.8.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:new_style
#
-# Manually add missing import
-from thrift.Thrift import TApplicationException
-
-from thrift.Thrift import TType, TMessageType, TException
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
@@ -1927,9 +1924,9 @@ def process_login(self, seqid, iprot, oprot):
result = login_result()
try:
self._handler.login(args.auth_request)
- except AuthenticationException, authnx:
+ except AuthenticationException as authnx:
result.authnx = authnx
- except AuthorizationException, authzx:
+ except AuthorizationException as authzx:
result.authzx = authzx
oprot.writeMessageBegin("login", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1943,7 +1940,7 @@ def process_set_keyspace(self, seqid, iprot, oprot):
result = set_keyspace_result()
try:
self._handler.set_keyspace(args.keyspace)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("set_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1957,13 +1954,13 @@ def process_get(self, seqid, iprot, oprot):
result = get_result()
try:
result.success = self._handler.get(args.key, args.column_path, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except NotFoundException, nfe:
+ except NotFoundException as nfe:
result.nfe = nfe
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1977,11 +1974,11 @@ def process_get_slice(self, seqid, iprot, oprot):
result = get_slice_result()
try:
result.success = self._handler.get_slice(args.key, args.column_parent, args.predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_slice", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1995,11 +1992,11 @@ def process_get_count(self, seqid, iprot, oprot):
result = get_count_result()
try:
result.success = self._handler.get_count(args.key, args.column_parent, args.predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_count", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2013,11 +2010,11 @@ def process_multiget_slice(self, seqid, iprot, oprot):
result = multiget_slice_result()
try:
result.success = self._handler.multiget_slice(args.keys, args.column_parent, args.predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("multiget_slice", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2031,11 +2028,11 @@ def process_multiget_count(self, seqid, iprot, oprot):
result = multiget_count_result()
try:
result.success = self._handler.multiget_count(args.keys, args.column_parent, args.predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("multiget_count", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2049,11 +2046,11 @@ def process_get_range_slices(self, seqid, iprot, oprot):
result = get_range_slices_result()
try:
result.success = self._handler.get_range_slices(args.column_parent, args.predicate, args.range, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_range_slices", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2067,11 +2064,11 @@ def process_get_paged_slice(self, seqid, iprot, oprot):
result = get_paged_slice_result()
try:
result.success = self._handler.get_paged_slice(args.column_family, args.range, args.start_column, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_paged_slice", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2085,11 +2082,11 @@ def process_get_indexed_slices(self, seqid, iprot, oprot):
result = get_indexed_slices_result()
try:
result.success = self._handler.get_indexed_slices(args.column_parent, args.index_clause, args.column_predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_indexed_slices", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2103,11 +2100,11 @@ def process_insert(self, seqid, iprot, oprot):
result = insert_result()
try:
self._handler.insert(args.key, args.column_parent, args.column, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("insert", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2121,11 +2118,11 @@ def process_add(self, seqid, iprot, oprot):
result = add_result()
try:
self._handler.add(args.key, args.column_parent, args.column, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("add", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2139,11 +2136,11 @@ def process_remove(self, seqid, iprot, oprot):
result = remove_result()
try:
self._handler.remove(args.key, args.column_path, args.timestamp, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("remove", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2157,11 +2154,11 @@ def process_remove_counter(self, seqid, iprot, oprot):
result = remove_counter_result()
try:
self._handler.remove_counter(args.key, args.path, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("remove_counter", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2175,11 +2172,11 @@ def process_batch_mutate(self, seqid, iprot, oprot):
result = batch_mutate_result()
try:
self._handler.batch_mutate(args.mutation_map, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("batch_mutate", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2193,11 +2190,11 @@ def process_atomic_batch_mutate(self, seqid, iprot, oprot):
result = atomic_batch_mutate_result()
try:
self._handler.atomic_batch_mutate(args.mutation_map, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("atomic_batch_mutate", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2211,11 +2208,11 @@ def process_truncate(self, seqid, iprot, oprot):
result = truncate_result()
try:
self._handler.truncate(args.cfname)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("truncate", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2229,7 +2226,7 @@ def process_describe_schema_versions(self, seqid, iprot, oprot):
result = describe_schema_versions_result()
try:
result.success = self._handler.describe_schema_versions()
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_schema_versions", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2243,7 +2240,7 @@ def process_describe_keyspaces(self, seqid, iprot, oprot):
result = describe_keyspaces_result()
try:
result.success = self._handler.describe_keyspaces()
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_keyspaces", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2279,7 +2276,7 @@ def process_describe_ring(self, seqid, iprot, oprot):
result = describe_ring_result()
try:
result.success = self._handler.describe_ring(args.keyspace)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_ring", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2293,7 +2290,7 @@ def process_describe_token_map(self, seqid, iprot, oprot):
result = describe_token_map_result()
try:
result.success = self._handler.describe_token_map()
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_token_map", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2329,9 +2326,9 @@ def process_describe_keyspace(self, seqid, iprot, oprot):
result = describe_keyspace_result()
try:
result.success = self._handler.describe_keyspace(args.keyspace)
- except NotFoundException, nfe:
+ except NotFoundException as nfe:
result.nfe = nfe
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2345,7 +2342,7 @@ def process_describe_splits(self, seqid, iprot, oprot):
result = describe_splits_result()
try:
result.success = self._handler.describe_splits(args.cfName, args.start_token, args.end_token, args.keys_per_split)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_splits", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2370,9 +2367,9 @@ def process_system_add_column_family(self, seqid, iprot, oprot):
result = system_add_column_family_result()
try:
result.success = self._handler.system_add_column_family(args.cf_def)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_add_column_family", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2386,9 +2383,9 @@ def process_system_drop_column_family(self, seqid, iprot, oprot):
result = system_drop_column_family_result()
try:
result.success = self._handler.system_drop_column_family(args.column_family)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_drop_column_family", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2402,9 +2399,9 @@ def process_system_add_keyspace(self, seqid, iprot, oprot):
result = system_add_keyspace_result()
try:
result.success = self._handler.system_add_keyspace(args.ks_def)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_add_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2418,9 +2415,9 @@ def process_system_drop_keyspace(self, seqid, iprot, oprot):
result = system_drop_keyspace_result()
try:
result.success = self._handler.system_drop_keyspace(args.keyspace)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_drop_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2434,9 +2431,9 @@ def process_system_update_keyspace(self, seqid, iprot, oprot):
result = system_update_keyspace_result()
try:
result.success = self._handler.system_update_keyspace(args.ks_def)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_update_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2450,9 +2447,9 @@ def process_system_update_column_family(self, seqid, iprot, oprot):
result = system_update_column_family_result()
try:
result.success = self._handler.system_update_column_family(args.cf_def)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_update_column_family", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2466,13 +2463,13 @@ def process_execute_cql_query(self, seqid, iprot, oprot):
result = execute_cql_query_result()
try:
result.success = self._handler.execute_cql_query(args.query, args.compression)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("execute_cql_query", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2486,7 +2483,7 @@ def process_prepare_cql_query(self, seqid, iprot, oprot):
result = prepare_cql_query_result()
try:
result.success = self._handler.prepare_cql_query(args.query, args.compression)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("prepare_cql_query", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2500,13 +2497,13 @@ def process_execute_prepared_cql_query(self, seqid, iprot, oprot):
result = execute_prepared_cql_query_result()
try:
result.success = self._handler.execute_prepared_cql_query(args.itemId, args.values)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("execute_prepared_cql_query", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2520,7 +2517,7 @@ def process_set_cql_version(self, seqid, iprot, oprot):
result = set_cql_version_result()
try:
self._handler.set_cql_version(args.version)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("set_cql_version", TMessageType.REPLY, seqid)
result.write(oprot)
View
4 pycassa/cassandra/constants.py
@@ -1,12 +1,12 @@
#
-# Autogenerated by Thrift Compiler (0.8.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:new_style
#
-from thrift.Thrift import TType, TMessageType, TException
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from ttypes import *
VERSION = "19.34.0"
View
4 pycassa/cassandra/ttypes.py
@@ -1,12 +1,12 @@
#
-# Autogenerated by Thrift Compiler (0.8.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:new_style
#
-from thrift.Thrift import TType, TMessageType, TException
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol

0 comments on commit 903dbd3

Please sign in to comment.