diff pylons_app/lib/middleware/simplehg.py @ 503:3d6d548ad3cc

Added user action mapper to map push to changeset. made exception in simplehg python 2.5 ready
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 24 Sep 2010 18:13:29 +0200
parents 946d8a680a1d
children 39203995f2c4
line wrap: on
line diff
--- a/pylons_app/lib/middleware/simplehg.py	Thu Sep 23 21:25:30 2010 +0200
+++ b/pylons_app/lib/middleware/simplehg.py	Fri Sep 24 18:13:29 2010 +0200
@@ -121,7 +121,7 @@
             return HTTPNotFound()(environ, start_response)
         try:
             app = wsgiapplication(self.__make_app)
-        except RepoError as e:
+        except RepoError, e:
             if str(e).find('not found') != -1:
                 return HTTPNotFound()(environ, start_response)
         except Exception:
@@ -195,7 +195,7 @@
             sa.commit()
             log.info('Adding user %s, action %s on %s',
                                             user.username, action, repo)
-        except Exception as e:
+        except Exception, e:
             sa.rollback()
             log.error('could not log user action:%s', str(e))
         finally: