aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/sca/target/binary.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/sca/target/binary.py')
-rw-r--r--pyecsca/sca/target/binary.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyecsca/sca/target/binary.py b/pyecsca/sca/target/binary.py
index 291f8bc..9e782f6 100644
--- a/pyecsca/sca/target/binary.py
+++ b/pyecsca/sca/target/binary.py
@@ -62,7 +62,9 @@ class BinaryTarget(SerialTarget):
def disconnect(self):
if self.process is None:
return
- self.process.stdin.close()
- self.process.stdout.close()
+ if self.process.stdin is not None:
+ self.process.stdin.close()
+ if self.process.stdout is not None:
+ self.process.stdout.close()
self.process.terminate()
self.process.wait()