Skip to content

Commit

Permalink
When checking protocol, need to ignore encoding character
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Nov 13, 2016
1 parent 13438d9 commit 28f7a92
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ZEO/ClientStorage.py
Expand Up @@ -383,7 +383,7 @@ def notify_connected(self, conn, info):
'interfaces', ()):
zope.interface.alsoProvides(self, iface)

if self.protocol_version >= b'Z5':
if self.protocol_version[1:] >= b'5':
self.ping = lambda : self._call('ping')
else:
self.ping = lambda : self._call('lastTransaction')
Expand Down
2 changes: 1 addition & 1 deletion src/ZEO/StorageServer.py
Expand Up @@ -228,7 +228,7 @@ def get_info(self):
storage = self.storage

supportsUndo = (getattr(storage, 'supportsUndo', lambda : False)()
and self.connection.protocol_version >= b'Z310')
and self.connection.protocol_version[1:] >= b'310')

# Communicate the backend storage interfaces to the client
storage_provides = zope.interface.providedBy(storage)
Expand Down
2 changes: 1 addition & 1 deletion src/ZEO/tests/utils.py
Expand Up @@ -39,7 +39,7 @@ class StorageServer:
"""

def __init__(self, test, storage,
protocol_version=best_protocol_version,
protocol_version=b'Z' + best_protocol_version,
**kw):
self.test = test
self.storage_server = ZEO.StorageServer.StorageServer(
Expand Down

0 comments on commit 28f7a92

Please sign in to comment.