mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Remove class-hierarchy (in preparation for further cleanup)
This commit is contained in:
@@ -4,20 +4,7 @@ from sentry.utils.safe import get_path
|
||||
from sentry.utils.strings import strip, truncatechars
|
||||
|
||||
|
||||
class BaseEvent:
|
||||
id = None
|
||||
|
||||
def get_metadata(self, data):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_title(self, metadata):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_location(self, data):
|
||||
return None
|
||||
|
||||
|
||||
class DefaultEvent(BaseEvent):
|
||||
class DefaultEvent:
|
||||
key = "default"
|
||||
|
||||
def get_metadata(self, data):
|
||||
|
||||
@@ -4,8 +4,6 @@ from sentry.stacktraces.functions import get_function_name_for_frame
|
||||
from sentry.stacktraces.processing import get_crash_frame_from_event_data
|
||||
from sentry.utils.safe import get_path, trim, truncatechars
|
||||
|
||||
from .base import BaseEvent
|
||||
|
||||
|
||||
def get_crash_location(data):
|
||||
frame = get_crash_frame_from_event_data(
|
||||
@@ -18,7 +16,7 @@ def get_crash_location(data):
|
||||
return frame.get("filename") or frame.get("abs_path"), func
|
||||
|
||||
|
||||
class ErrorEvent(BaseEvent):
|
||||
class ErrorEvent:
|
||||
key = "error"
|
||||
|
||||
def get_metadata(self, data):
|
||||
|
||||
Reference in New Issue
Block a user