# HG changeset patch # User Marcin Kuzminski # Date 2017-02-23 12:07:35 # Node ID 40d7e43cf927481fc04554b085ca7a7d0ad95c13 # Parent c608ea737ba78409291cdcccd705b7dfadee1b98 exceptions: for dulwich we cannot catch all exceptions because it re-uses some general exceptions for it's use. diff --git a/vcsserver/git.py b/vcsserver/git.py --- a/vcsserver/git.py +++ b/vcsserver/git.py @@ -59,9 +59,12 @@ def reraise_safe_exceptions(func): except (HangupException, UnexpectedCommandError) as e: raise exceptions.VcsException(e.message) except Exception as e: - if not hasattr(e, '_vcs_kind'): - log.exception("Unhandled exception in git remote call") - raise_from_original(exceptions.UnhandledException) + # NOTE(marcink): becuase of how dulwich handles some exceptions + # (KeyError on empty repos), we cannot track this and catch all + # exceptions, it's an exceptions from other handlers + #if not hasattr(e, '_vcs_kind'): + #log.exception("Unhandled exception in git remote call") + #raise_from_original(exceptions.UnhandledException) raise return wrapper