Package: gamera / 1:3.4.2+git20160808.1725654-1

0003-trap-errors-from-pclose.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From dec7f0754bf603203207c7a88de5f0bad1d6b317 Mon Sep 17 00:00:00 2001
From: Jakub Wilk <jwilk@debian.org>
Date: Sat, 17 Oct 2015 18:41:49 +0200
Subject: trap-errors-from-pclose

   trap errors from pclose(3)
   Forwarded: no
---
 tests/test_graph.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/test_graph.py b/tests/test_graph.py
index 8435ce3..fcff910 100644
--- a/tests/test_graph.py
+++ b/tests/test_graph.py
@@ -935,7 +935,8 @@ def memory_usage():
       cmd = "ps u -p %i | awk '{sum=sum+$6}; END {print sum}'" % os.getpid()
       p = os.popen(cmd, "r")
       memory = p.readline().strip()
-      p.close()
+      if p.close() is not None:
+            raise OSError
       return memory