[Zope3-checkins] CVS: Zope3/src/zope/app/applicationcontrol - runtimeinfo.py:1.8

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


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

Modified Files:
	runtimeinfo.py 
Log Message:
Changes:

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



=== Zope3/src/zope/app/applicationcontrol/runtimeinfo.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/applicationcontrol/runtimeinfo.py:1.7	Wed Mar 24 06:13:13 2004
+++ Zope3/src/zope/app/applicationcontrol/runtimeinfo.py	Thu Mar 25 09:37:08 2004
@@ -37,12 +37,12 @@
 
     def getPreferredEncoding(self):
         """See zope.app.applicationcontrol.interfaces.IRuntimeInfo"""
-        if locale is None:
-            return sys.getdefaultencoding()
-        try:
-            return locale.getpreferredencoding()
-        except locale.Error:
-            return sys.getdefaultencoding()
+        if locale is not None:
+            try:
+                return locale.getpreferredencoding()
+            except locale.Error:
+                pass
+        return sys.getdefaultencoding()
 
     def getFileSystemEncoding(self):
         """See zope.app.applicationcontrol.interfaces.IRuntimeInfo"""




More information about the Zope3-Checkins mailing list