Skip to content

Commit

Permalink
Fix typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSun48 committed Apr 12, 2024
1 parent f40e620 commit 415560e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sentry/integrations/utils/code_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ class UnsupportedFrameFilename(Exception):
class FrameFilename:
def __init__(self, frame_file_path: str) -> None:
self.raw_path = frame_file_path

is_windows_path = False
if "\\" in frame_file_path:
is_windows_path = True
frame_file_path = frame_file_path.replace("\\", "/")

if frame_file_path[0] == "/" or frame_file_path[0] == "\\":
Expand All @@ -83,7 +84,7 @@ def __init__(self, frame_file_path: str) -> None:
raise UnsupportedFrameFilename("It needs an extension.")

# Remove drive letter if it exists
if self.is_windows_path and frame_file_path[1] == ":":
if is_windows_path and frame_file_path[1] == ":":
frame_file_path = frame_file_path[2:]

start_at_index = get_straight_path_prefix_end_index(frame_file_path)
Expand Down

0 comments on commit 415560e

Please sign in to comment.