[pypy-svn] pypy default: Fix translation on pypy (resulting pypy has no fpathconf though)

fijal commits-noreply at bitbucket.org
Tue Jan 18 10:51:16 CET 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r40835:99b111aa07c9
Date: 2011-01-18 11:50 +0200
http://bitbucket.org/pypy/pypy/changeset/99b111aa07c9/

Log:	Fix translation on pypy (resulting pypy has no fpathconf though)

diff --git a/pypy/module/posix/__init__.py b/pypy/module/posix/__init__.py
--- a/pypy/module/posix/__init__.py
+++ b/pypy/module/posix/__init__.py
@@ -116,8 +116,9 @@
         interpleveldefs['uname'] = 'interp_posix.uname'
     if hasattr(os, 'sysconf'):
         interpleveldefs['sysconf'] = 'interp_posix.sysconf'
+        interpleveldefs['sysconf_names'] = 'space.wrap(os.sysconf_names)'
+    if hasattr(os, 'fpathconf'):
         interpleveldefs['fpathconf'] = 'interp_posix.fpathconf'
-        interpleveldefs['sysconf_names'] = 'space.wrap(os.sysconf_names)'
         interpleveldefs['pathconf_names'] = 'space.wrap(os.pathconf_names)'
     if hasattr(os, 'ttyname'):
         interpleveldefs['ttyname'] = 'interp_posix.ttyname'


More information about the Pypy-commit mailing list