diff MoinMoin/themes/__init__.py @ 135:75312c9b94e3

use except...as syntax, use raise Exception(...) syntax, fix some imports
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Mar 2011 02:31:24 +0100
parents 81f0ff7a5cae
children 751ebb4ff42b
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Sun Mar 20 00:00:44 2011 +0100
+++ b/MoinMoin/themes/__init__.py	Sun Mar 20 02:31:24 2011 +0100
@@ -240,9 +240,10 @@
                                 pass # ignore invalid lines
                         f.close()
                         app.cache.set(cid, sisteritems)
-                        logging.info(u"Site: %s Status: Updated. Pages: %d" % (sistername, len(sisteritems)))
-                    except IOError, (title, code, msg, headers): # code e.g. 304
-                        logging.warning(u"Site: %s Status: Not updated." % sistername)
+                        logging.info("Site: %s Status: Updated. Pages: %d" % (sistername, len(sisteritems)))
+                    except IOError as err:
+                        (title, code, msg, headers) = err.args # code e.g. 304
+                        logging.warning("Site: %s Status: Not updated." % sistername)
                         logging.exception("exception was:")
                 if current in sisteritems:
                     url = sisteritems[current]