changeset 1790:abe8fa4a13b2

pollsistersites: workaround for python 2.5 bug
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 22 Feb 2007 18:51:15 +0100
parents 8da1d5df4b90
children 6dd2e29acffe
files MoinMoin/action/pollsistersites.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/pollsistersites.py	Thu Feb 22 17:05:48 2007 +0100
+++ b/MoinMoin/action/pollsistersites.py	Thu Feb 22 18:51:15 2007 +0100
@@ -49,7 +49,9 @@
             data['sisterpages'] = sisterpages
             cache.update(data)
             status.append(u"Site: %s Status: Updated. Pages: %d" % (sistername, len(sisterpages)))
-        except IOError, (title, code, msg, headers):
+        except IOError, (title, code, msg, headers): # code e.g. 304
+            status.append(u"Site: %s Status: Not updated." % sistername)
+        except TypeError: # catch bug in python 2.5: "EnvironmentError expected at most 3 arguments, got 4"
             status.append(u"Site: %s Status: Not updated." % sistername)
 
     request.emit_http_headers(["Content-Type: text/plain; charset=UTF-8"])