Mercurial > kallithea
diff kallithea/lib/middleware/pygrack.py @ 5374:d69aa464f373
cleanup: consistently use 'except ... as ...:'
Use the Python 2.6+ syntax instead of the old confusing 'except ..., ...'
syntax.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sun, 09 Aug 2015 02:17:14 +0200 |
parents | 0e2d450feb03 |
children | 0210d0b769d4 |
line wrap: on
line diff
--- a/kallithea/lib/middleware/pygrack.py Thu Aug 06 11:42:57 2015 +0200 +++ b/kallithea/lib/middleware/pygrack.py Sun Aug 09 02:17:14 2015 +0200 @@ -89,7 +89,7 @@ out = subprocessio.SubprocessIOChunker(cmd, starting_values=[packet_len + server_advert + '0000'] ) - except EnvironmentError, e: + except EnvironmentError as e: log.error(traceback.format_exc()) raise exc.HTTPExpectationFailed() resp = Response() @@ -129,7 +129,7 @@ env=gitenv, cwd=self.content_path, ) - except EnvironmentError, e: + except EnvironmentError as e: log.error(traceback.format_exc()) raise exc.HTTPExpectationFailed() @@ -157,10 +157,10 @@ app = self.backend try: resp = app(request, environ) - except exc.HTTPException, e: + except exc.HTTPException as e: resp = e log.error(traceback.format_exc()) - except Exception, e: + except Exception as e: log.error(traceback.format_exc()) resp = exc.HTTPInternalServerError() return resp(environ, start_response)