[pypy-svn] r64373 - in pypy/trunk/pypy: module/posix rpython/module
arigo at codespeak.net
arigo at codespeak.net
Sun Apr 19 16:08:29 CEST 2009
Author: arigo
Date: Sun Apr 19 16:08:29 2009
New Revision: 64373
Modified:
pypy/trunk/pypy/module/posix/interp_posix.py
pypy/trunk/pypy/rpython/module/ll_os.py
Log:
for now, ignore calls on directories on Windows,
just because they always give EACCES so far
Modified: pypy/trunk/pypy/module/posix/interp_posix.py
==============================================================================
--- pypy/trunk/pypy/module/posix/interp_posix.py (original)
+++ pypy/trunk/pypy/module/posix/interp_posix.py Sun Apr 19 16:08:29 2009
@@ -7,7 +7,7 @@
from pypy.rpython.module import ll_os_stat
from pypy.rpython.lltypesystem import lltype
-import os
+import os, sys
def open(space, fname, flag, mode=0777):
"""Open a file (for low level IO).
@@ -543,6 +543,12 @@
Set the access and modified time of the file to the given values. If the
second form is used, set the access and modified times to the current time.
"""
+ # XXX for now, ignore calls on directories on Windows,
+ # just because they always give EACCES so far
+ if sys.platform == 'win32':
+ if os.path.isdir(path):
+ return
+
if space.is_w(w_tuple, space.w_None):
try:
os.utime(path, None)
Modified: pypy/trunk/pypy/rpython/module/ll_os.py
==============================================================================
--- pypy/trunk/pypy/rpython/module/ll_os.py (original)
+++ pypy/trunk/pypy/rpython/module/ll_os.py Sun Apr 19 16:08:29 2009
@@ -277,6 +277,9 @@
HAVE_UTIMES = platform.Has('utimes')
config = platform.configure(CConfig)
+ # XXX note that on Windows, calls to os.utime() are ignored on
+ # directories. Remove that hack over there once it's fixed here!
+
if config['HAVE_UTIMES']:
class CConfig:
_compilation_info_ = ExternalCompilationInfo(
More information about the Pypy-commit
mailing list