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