Skip to content

Commit eb97760

Browse files
committed
fix bug when source filename is not available
1 parent 1446480 commit eb97760

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pudb/debugger.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2624,7 +2624,9 @@ def get_source_filename():
26242624
available_width = self.screen.get_cols_rows(
26252625
)[0] - (len(info_string) + len(separator))
26262626
full_filename = self.source_code_provider.get_source_identifier()
2627-
if available_width > len(full_filename):
2627+
if (full_filename is None):
2628+
return "Source filename not available"
2629+
elif available_width > len(full_filename):
26282630
return full_filename
26292631
else:
26302632
trim_index = len(full_filename) - available_width

0 commit comments

Comments
 (0)