mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-22 14:12:29 +00:00
parent
36f5fd2865
commit
6d6cfacdc8
@ -15,12 +15,18 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import raven
|
||||
import os
|
||||
import sys
|
||||
import struct
|
||||
import platform
|
||||
|
||||
try:
|
||||
import raven
|
||||
RAVEN_AVAILABLE = True
|
||||
except ImportError:
|
||||
# raven is not installed with deb package in order to simplify packagin
|
||||
RAVEN_AVAILABLE = False
|
||||
|
||||
from .version import __version__
|
||||
from .config import Config
|
||||
|
||||
@ -47,6 +53,8 @@ class CrashReport:
|
||||
self._client = None
|
||||
|
||||
def capture_exception(self, request=None):
|
||||
if not RAVEN_AVAILABLE:
|
||||
return
|
||||
server_config = Config.instance().get_section_config("Server")
|
||||
if server_config.getboolean("report_errors"):
|
||||
if self._client is None:
|
||||
|
Loading…
Reference in New Issue
Block a user