[Zope3-checkins] CVS: Zope3/src/zope/app/applicationcontrol/tests - test_runtimeinfo.py:1.10

Dmitry Vasiliev dima at hlabs.spb.ru
Thu Mar 25 09:37:44 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/applicationcontrol/tests
In directory cvs.zope.org:/tmp/cvs-serv20405/src/zope/app/applicationcontrol/tests

Modified Files:
	test_runtimeinfo.py 
Log Message:
Changes:

- RuntimeInfo updated
- PythonPage bug: 'compile() don't accept "\r"'
- Russian translation updated



=== Zope3/src/zope/app/applicationcontrol/tests/test_runtimeinfo.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/applicationcontrol/tests/test_runtimeinfo.py:1.9	Wed Mar 24 06:13:15 2004
+++ Zope3/src/zope/app/applicationcontrol/tests/test_runtimeinfo.py	Thu Mar 25 09:37:08 2004
@@ -48,9 +48,12 @@
         return RuntimeInfo(applicationController)
 
     def _getPreferredEncoding(self):
-        if locale is None:
-            return sys.getdefaultencoding()
-        return locale.getpreferredencoding()
+        if locale is not None:
+            try:
+                return locale.getpreferredencoding()
+            except locale.Error:
+                pass
+        return sys.getdefaultencoding()
 
     def _getFileSystemEncoding(self):
         enc = sys.getfilesystemencoding()




More information about the Zope3-Checkins mailing list