Skip to content

Commit 7cbbc01

Browse files
authored
Fix error handling in sampler.rs (#645)
We were calling unwrap_err when failing to create a PythonSpy object in sampler.rs (on the result of sending the error on a channel), when we should have been calling unwrap. Fix. See #644 Also fix freebsd ci
1 parent 2f8cfdd commit 7cbbc01

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ jobs:
145145
run: lscpu
146146
- name: Install VM tools
147147
run: |
148+
sudo apt-get update -qq
148149
sudo apt-get install -qq -o=Dpkg::Use-Pty=0 moreutils
149150
sudo chronic apt-get install -qq -o=Dpkg::Use-Pty=0 vagrant virtualbox qemu libvirt-daemon-system
150151
- name: Set up VM

src/sampler.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl Sampler {
5656
spy
5757
}
5858
Err(e) => {
59-
initialized_tx.send(Err(e)).unwrap_err();
59+
initialized_tx.send(Err(e)).unwrap();
6060
return;
6161
}
6262
};
@@ -308,7 +308,7 @@ impl PythonSpyThread {
308308
}
309309
Err(e) => {
310310
warn!("Failed to profile python from process {}: {}", pid, e);
311-
initialized_tx.send(Err(e)).unwrap_err();
311+
initialized_tx.send(Err(e)).unwrap();
312312
return;
313313
}
314314
};

0 commit comments

Comments
 (0)