Skip to content

Commit

Permalink
We need to use six.string_types in a few other places to account for …
Browse files Browse the repository at this point in the history
…the change in ZConfig. unix_domain_sockets() was failing before this on Python 2.
  • Loading branch information
jamadden committed Jul 11, 2017
1 parent cae5dfe commit f34a9b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ matrix:
- os: linux
python: 2.7
- os: linux
python: pypy-5.4.1
python: pypy-5.6.0
- os: linux
python: 3.4
- os: linux
Expand Down
4 changes: 2 additions & 2 deletions src/ZEO/ClientStorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ def __init__(self, addr, storage='1', cache_size=20 * MB,

self.__name__ = name or str(addr) # Standard convention for storages

if isinstance(addr, str):
if isinstance(addr, six.string_types):
addr = [addr]
elif (isinstance(addr, tuple) and len(addr) == 2 and
isinstance(addr[0], str) and isinstance(addr[1], int)):
isinstance(addr[0], six.string_types) and isinstance(addr[1], int)):
addr = [addr]

logger.info(
Expand Down
2 changes: 1 addition & 1 deletion src/ZEO/tests/forker.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, addr, log=None, **options):
else:
self.logpath = 'server.log'

if not isinstance(addr, str):
if not isinstance(addr, six.string_types):
addr = '%s:%s' % addr

self.log = log
Expand Down

0 comments on commit f34a9b0

Please sign in to comment.