Fixes for NetFS share mounting under 10.8.x

This commit is contained in:
Greg Neagle
2016-10-31 13:54:18 -07:00
parent 0518e4048e
commit 069810a1ad
2 changed files with 12 additions and 4 deletions
+6 -2
View File
@@ -99,8 +99,12 @@ if NETFSMOUNTURLSYNC_AVAILABLE:
sh_url, None, None, None, open_options, mount_options, None)
# Check if it worked
if result != 0:
if result in (errno.ENOTSUP, errno.EAUTH):
# errno.ENOTSUP is returned if an afp share needs a login
if result in (-6600, errno.EINVAL, errno.ENOTSUP, errno.EAUTH):
# -6600 is kNetAuthErrorInternal in NetFS.h 10.9+
# errno.EINVAL is returned if an afp share needs a login in
# some versions of OS X
# errno.ENOTSUP is returned if an afp share needs a login in
# some versions of OS X
# errno.EAUTH is returned if authentication fails (SMB for sure)
raise ShareAuthenticationNeededException()
raise ShareMountException(
+6 -2
View File
@@ -101,8 +101,12 @@ def mount_share(share_url):
sh_url, None, None, None, open_options, mount_options, None)
# Check if it worked
if result != 0:
if result in (errno.ENOTSUP, errno.EAUTH):
# errno.ENOTSUP is returned if an afp share needs a login
if result in (-6600, errno.EINVAL, errno.ENOTSUP, errno.EAUTH):
# -6600 is kNetAuthErrorInternal in NetFS.h 10.9+
# errno.EINVAL is returned if an afp share needs a login in some
# versions of OS X
# errno.ENOTSUP is returned if an afp share needs a login in some
# versions of OS X
# errno.EAUTH is returned if authentication fails (SMB for sure)
raise ShareAuthenticationNeededException()
raise ShareMountException('Error mounting url "%s": %s, error %s'