projects
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fc3f80
)
Adjust entrez.py to print the name of failing external commands.
author
W. Trevor King
<wking@drexel.edu>
Wed, 20 Jul 2011 16:52:54 +0000
(12:52 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Wed, 20 Jul 2011 16:52:57 +0000
(12:52 -0400)
This provides a useful hint if someone forgot to install one of the
dependencies.
posts/entrez/entrez.py
patch
|
blob
|
history
diff --git
a/posts/entrez/entrez.py
b/posts/entrez/entrez.py
index 11356aa188c43c051b8b88fde7dcfb1b258d866e..b02a32c2186c4ff34b289ab4d6f3457341f53eb3 100755
(executable)
--- a/
posts/entrez/entrez.py
+++ b/
posts/entrez/entrez.py
@@
-150,10
+150,13
@@
class Pipe (object):
kwargs = {}
if _POSIX:
kwargs['close_fds'] = True
- self._procs.append(_subprocess.Popen(
- cmd, stdin=stdin, stdout=_subprocess.PIPE,
- stderr=_subprocess.PIPE, **kwargs))
-
+ try:
+ self._procs.append(_subprocess.Popen(
+ cmd, stdin=stdin, stdout=_subprocess.PIPE,
+ stderr=_subprocess.PIPE, **kwargs))
+ except OSError:
+ LOG.error(cmd)
+ raise
self.stdout,self.stderrs = self._communicate(input=stdin_str)
# collect process statuses