Author: Philip Jenvey <pjen...@underboss.org> Branch: py3k Changeset: r84639:75c91061e23d Date: 2016-05-23 13:00 -0700 http://bitbucket.org/pypy/pypy/changeset/75c91061e23d/
Log: osx (10.9?) fixes diff --git a/pypy/module/posix/interp_posix.py b/pypy/module/posix/interp_posix.py --- a/pypy/module/posix/interp_posix.py +++ b/pypy/module/posix/interp_posix.py @@ -1136,12 +1136,12 @@ dir_fd may not be implemented on your platform. If it is unavailable, using it will raise a NotImplementedError.""" try: - if dir_fd == DEFAULT_DIR_FD: - dispatch_filename_2(rposix.symlink)(space, w_src, w_dst) - else: + if rposix.HAVE_SYMLINKAT and dir_fd != DEFAULT_DIR_FD: src = space.fsencode_w(w_src) dst = space.fsencode_w(w_dst) rposix.symlinkat(src, dst, dir_fd) + else: + dispatch_filename_2(rposix.symlink)(space, w_src, w_dst) except OSError as e: raise wrap_oserror(space, e) @@ -1159,10 +1159,10 @@ dir_fd may not be implemented on your platform. If it is unavailable, using it will raise a NotImplementedError.""" try: - if dir_fd == DEFAULT_DIR_FD: + if rposix.HAVE_READLINKAT and dir_fd != DEFAULT_DIR_FD: + result = call_rposix(rposix.readlinkat, path, dir_fd) + else: result = call_rposix(rposix.readlink, path) - else: - result = call_rposix(rposix.readlinkat, path, dir_fd) except OSError as e: raise wrap_oserror2(space, e, path.w_path) w_result = space.wrapbytes(result) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit