          policy.
          """
          if value is None:
              # Remove any custom expiration for this session.
              with suppress(KeyError):
                  del self['_session_expiry']
              return
          if isinstance(value, timedelta):
              value = timezone.now() + value
          self['_session_expiry'] = value
 
</s> remove             with suppress(GDALException):
 </s> add             try: </s> remove         with suppress(KeyError):
 </s> add         try: </s> remove                 with suppress(ValueError):
 </s> add                 try:
            try:
          policy.
          """
          if value is None:
              # Remove any custom expiration for this session.
            try:
                  del self['_session_expiry']
              return
          if isinstance(value, timedelta):
              value = timezone.now() + value
          self['_session_expiry'] = value
keep keep keep keep replace keep keep keep keep keep
 Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."

This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda
because try/except performs better. 
django/contrib/sessions/backends/base.py