summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-08-23 15:39:24 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-08-23 17:35:46 -0700
commit222017927663f41105fc008f3fd81819a64e6eb8 (patch)
tree5fc8d8ceabaa59e12e796f649689bf4720cf9cc2 /alot
parent5f96f0dffcc7dba76c1f1a96e624fa3ab46e7b6e (diff)
commands/globals: Only set stdin to a pipe if there is data
Otherwise the editor will crash. I can't figure out for the life of me to test this. I thought that I would be able to do something like detect if stdin is a tty or something else, but that doesn't seem to work. Fixes #1137
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/globals.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index 787ff450..565bd742 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -268,7 +268,7 @@ class ExternalCommand(Command):
def thread_code(*_):
try:
proc = subprocess.Popen(self.cmdlist, shell=self.shell,
- stdin=subprocess.PIPE,
+ stdin=subprocess.PIPE if stdin else None,
stderr=subprocess.PIPE)
except OSError as e:
return str(e)