diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-07-23 16:56:27 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-07-23 16:56:27 -0700 |
commit | 39ebcfca12bbcd265d9e298bb35c3e9c065536c0 (patch) | |
tree | e5ae5653c37d3d79a0f409ba86588b0670b2dce4 | |
parent | 9d436602b06fe08c83d7f78986a8dee789153445 (diff) | |
download | kazoo-39ebcfca12bbcd265d9e298bb35c3e9c065536c0.tar.gz |
Remove code not needed when six is useable
-rw-r--r-- | kazoo/protocol/serialization.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/kazoo/protocol/serialization.py b/kazoo/protocol/serialization.py index 88bb9e2..a550121 100644 --- a/kazoo/protocol/serialization.py +++ b/kazoo/protocol/serialization.py @@ -7,6 +7,8 @@ from kazoo.protocol.states import ZnodeStat from kazoo.security import ACL from kazoo.security import Id +import six + # Struct objects with formats compiled bool_struct = struct.Struct('B') int_struct = struct.Struct('!i') @@ -19,11 +21,6 @@ multiheader_struct = struct.Struct('!iBi') reply_header_struct = struct.Struct('!iqi') stat_struct = struct.Struct('!qqqqiiiqiiq') -try: # pragma: nocover - basestring -except NameError: - basestring = str - def read_string(buffer, offset): """Reads an int specified buffer into a string and returns the @@ -346,7 +343,7 @@ class Transaction(namedtuple('Transaction', 'operations')): def unchroot(client, response): resp = [] for result in response: - if isinstance(result, basestring): + if isinstance(result, six.string_types): resp.append(client.unchroot(result)) else: resp.append(result) |