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

Daniel Stender stender at moszumanska.debian.org
Mon Aug 8 08:55:28 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 dec7f0754bf603203207c7a88de5f0bad1d6b317
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