Author: ianb
Date: 2008-10-28 09:39:27 -0600 (Tue, 28 Oct 2008)
New Revision: 3636

Modified:
   FormEncode/trunk/formencode/api.py
Log:
fall back on in-package location when os.access doesn't exist

Modified: FormEncode/trunk/formencode/api.py
===================================================================
--- FormEncode/trunk/formencode/api.py  2008-10-27 21:38:29 UTC (rev 3635)
+++ FormEncode/trunk/formencode/api.py  2008-10-28 15:39:27 UTC (rev 3636)
@@ -32,6 +32,9 @@
         except NotImplementedError:
             # resource_filename doesn't work with non-egg zip files
             pass
+    if not hasattr(os, 'access'):
+        # This happens on Google App Engine
+        os.path.join(os.path.dirname(__file__), 'i18n')
     if os.access(locale_dir, os.R_OK | os.X_OK):
         # If the resource is present in the egg, use it
         return locale_dir


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs

Reply via email to