misc: remove support for requests being an optional module (#21773)

This commit is contained in:
Frédéric Péters 2018-02-10 20:15:56 +01:00
parent c94d98b5b2
commit 41f35ff075
1 changed files with 2 additions and 3 deletions

View File

@ -32,15 +32,14 @@ import __builtin__
__builtin__.__dict__['N_'] = lambda x: x
import linecache
import requests
from StringIO import StringIO
import xml.etree.ElementTree as ET
try:
import raven
import requests
except ImportError:
raven = None
requests = None
from django.conf import settings
from django.http import Http404
@ -269,7 +268,7 @@ class QommonPublisher(Publisher, object):
pass
def can_sentry(self):
return (raven is not None and requests is not None)
return (raven is not None)
def notify_sentry(self, exc_tuple, request=None, context=None):
if not self.can_sentry():