[Python-modules-commits] [gamera] 04/17: trap-errors-from-pclose

Daniel Stender stender at moszumanska.debian.org
Tue Apr 26 18:43:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

stender pushed a commit to branch master
in repository gamera.

commit 735917a8b9fa7314004c601314675fc2000c0d34
Author: Jakub Wilk <jwilk at debian.org>
Date:   Sat Oct 17 18:41:49 2015 +0200

    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
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/gamera.git



More information about the Python-modules-commits mailing list