changeset 50:69dfbae549ac

merge moin--main--1.3--patch-929 - cgitb: refactror system details, use rfc2822 date Patches applied: * arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-929 cgitb: refactror system details, use rfc2822 date imported from: moin--main--1.5--patch-51
author Nir Soffer <nirs@freeshell.org>
date Thu, 29 Sep 2005 00:09:43 +0000
parents cf52f97a5857
children 54d5932d5a03
files ChangeLog MoinMoin/support/cgitb.py
diffstat 2 files changed, 27 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 29 00:07:04 2005 +0000
+++ b/ChangeLog	Thu Sep 29 00:09:43 2005 +0000
@@ -36,6 +36,18 @@
      MoinMoin/wikiaction.py
 
 
+2005-09-03 16:54:10 GMT	Nir Soffer <nirs@freeshell.org>	patch-929
+
+    Summary:
+      cgitb: refactror system details, use rfc2822 date
+    Revision:
+      moin--main--1.3--patch-929
+
+
+    modified files:
+     ChangeLog MoinMoin/support/cgitb.py
+
+
 2005-09-02 16:09:21 GMT	Nir Soffer <nirs@freeshell.org>	patch-928
 
     Summary:
--- a/MoinMoin/support/cgitb.py	Thu Sep 29 00:07:04 2005 +0000
+++ b/MoinMoin/support/cgitb.py	Thu Sep 29 00:09:43 2005 +0000
@@ -486,20 +486,27 @@
     # System details
 
     def formatSystemDetails(self):
-        details = self.systemDetails() + self.applicationDetails()
+        details = ['Date: %s' % self.date(),
+                   'Platform: %s' % self.platform(),
+                   'Python: %s' % self.python(),]
+        details += self.applicationDetails()
         return (self.formatter.subTitle('System Details') +
                 self.formatter.list(details, {'class': 'system'}))
 
-    def systemDetails(self):
+    def date(self):
         import time
+        rfc2822Date = time.strftime("%a, %d %b %Y %H:%M:%S +0000",
+                                    time.gmtime())
+        return rfc2822Date
+
+    def platform(self):
         try:
-            platform = pydoc.html.escape(' '.join(os.uname()))
+            return pydoc.html.escape(' '.join(os.uname()))
         except:
-            platform = pydoc.html.escape('%s (%s)' % (sys.platform, os.name))
-        return ['Date: %s' % time.ctime(time.time()),
-                'Platform: %s' % platform,
-                'Python: Python %s (%s)' % (sys.version.split()[0],
-                                              sys.executable),]
+            return pydoc.html.escape('%s (%s)' % (sys.platform, os.name))
+
+    def python(self):
+        return 'Python %s (%s)' % (sys.version.split()[0], sys.executable)
 
     def applicationDetails(self):
         """ Override for your application """