Commit 88a40ec1 authored by Chris McDonough's avatar Chris McDonough

Mac OS X uses EINVAL to signal timeout failure.

Formatting changes.
parent 066c77ac
...@@ -315,8 +315,7 @@ class ClientStorage(object): ...@@ -315,8 +315,7 @@ class ClientStorage(object):
self._lock = threading.Lock() self._lock = threading.Lock()
# XXX need to check for POSIX-ness here # XXX need to check for POSIX-ness here
if blob_dir is not None and \ if blob_dir is not None and (os.stat(blob_dir).st_mode & 077) != 0:
(os.stat(blob_dir).st_mode & 077) != 0:
log2('Blob dir %s has insecure mode setting' % blob_dir, log2('Blob dir %s has insecure mode setting' % blob_dir,
level=logging.WARNING) level=logging.WARNING)
...@@ -978,7 +977,8 @@ class ClientStorage(object): ...@@ -978,7 +977,8 @@ class ClientStorage(object):
3. If not beeing downloaded, start download 3. If not beeing downloaded, start download
""" """
if self.blob_dir is None: if self.blob_dir is None:
raise POSException.Unsupported("No blob cache directory is configured. Can not load blob.") raise POSException.Unsupported("No blob cache directory is "
"configured.")
blob_filename = self._getCleanFilename(oid, serial) blob_filename = self._getCleanFilename(oid, serial)
# Case 1: Blob is available already, just use it # Case 1: Blob is available already, just use it
......
...@@ -185,6 +185,10 @@ def shutdown_zeo_server(adminaddr): ...@@ -185,6 +185,10 @@ def shutdown_zeo_server(adminaddr):
break break
raise raise
except socket.error, e: except socket.error, e:
# Mac OS X uses EINVAL to signal unbound socket timeout failure
if sys.platform == 'darwin':
if e[0] == errno.EINVAL and i > 0:
break
if e[0] == errno.ECONNREFUSED and i > 0: if e[0] == errno.ECONNREFUSED and i > 0:
break break
raise raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment