diff rhodecode/lib/middleware/simplegit.py @ 3631:10b4e34841a4 beta

Don't catch all exceptions
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 28 Mar 2013 03:34:36 +0100
parents 260a7a01b054
children 336184b9f4cf
line wrap: on
line diff
--- a/rhodecode/lib/middleware/simplegit.py	Thu Mar 28 03:29:38 2013 +0100
+++ b/rhodecode/lib/middleware/simplegit.py	Thu Mar 28 03:34:36 2013 +0100
@@ -122,7 +122,7 @@
         try:
             repo_name = self.__get_repository(environ)
             log.debug('Extracted repo name is %s' % repo_name)
-        except:
+        except Exception:
             return HTTPInternalServerError()(environ, start_response)
 
         # quick check if that dir exists...
@@ -178,7 +178,7 @@
                     if user is None or not user.active:
                         return HTTPForbidden()(environ, start_response)
                     username = user.username
-                except:
+                except Exception:
                     log.error(traceback.format_exc())
                     return HTTPInternalServerError()(environ, start_response)
 
@@ -272,7 +272,7 @@
         try:
             environ['PATH_INFO'] = self._get_by_id(environ['PATH_INFO'])
             repo_name = GIT_PROTO_PAT.match(environ['PATH_INFO']).group(1)
-        except:
+        except Exception:
             log.error(traceback.format_exc())
             raise