Skip to content

Commit 25e9b32

Browse files
authored
fix nits (#268)
1 parent 25a0851 commit 25e9b32

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

mitmproxy-contentviews/src/protobuf/raw_to_proto.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,13 @@ fn create_descriptor_proto(
9595
data: &[u8],
9696
existing: &MessageDescriptor,
9797
) -> anyhow::Result<DescriptorProto> {
98-
let message = existing
99-
.parse_from_bytes(data)
100-
.with_context(|| format!("failed to parse protobuf: {}", existing.full_name()))?;
98+
let message = existing.parse_from_bytes(data).with_context(|| {
99+
if existing.full_name().starts_with("Unknown") {
100+
"invalid format".to_string()
101+
} else {
102+
format!("failed to parse {}", existing.full_name())
103+
}
104+
})?;
101105

102106
let mut descriptor = existing.proto().clone();
103107

mitmproxy-rs/mitmproxy_rs/process_info.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def executable_icon(path: Path | str) -> bytes: ...
77
@final
88
class Process:
99
@property
10-
def executable(self) -> str: ...
10+
def executable(self) -> Path: ...
1111
@property
1212
def display_name(self) -> str: ...
1313
@property

0 commit comments

Comments
 (0)