changeset 7983:b075693b3214

pygrack: address webob AcceptValidHeader DeprecationWarning Got warnings like: kallithea/tests/other/test_vcs_operations.py::TestVCSOperations::test_yada_yada .../site-packages/webob/acceptparse.py:649: DeprecationWarning: The behavior of AcceptValidHeader.__contains__ is currently being maintained for backward compatibility, but it will change in the future to better conform to the RFC. DeprecationWarning, There *must* be a better alternative to pygrack ... for now, let's keep it alive.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 24 Nov 2019 21:40:05 +0100
parents 4b7909501c5c
children 062aa10097bc
files kallithea/lib/middleware/pygrack.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/middleware/pygrack.py	Thu Nov 21 12:44:42 2019 +0100
+++ b/kallithea/lib/middleware/pygrack.py	Sun Nov 24 21:40:05 2019 +0100
@@ -186,7 +186,7 @@
         _path = self._get_fixedpath(req.path_info)
         if _path.startswith('info/refs'):
             app = self.inforefs
-        elif [a for a in self.valid_accepts if a in req.accept]:
+        elif req.accept.acceptable_offers(self.valid_accepts):
             app = self.backend
         try:
             resp = app(req, environ)