summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/commands/globals.py2
-rw-r--r--tests/commands/global_test.py3
2 files changed, 1 insertions, 4 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)
diff --git a/tests/commands/global_test.py b/tests/commands/global_test.py
index e93a11d3..9489c909 100644
--- a/tests/commands/global_test.py
+++ b/tests/commands/global_test.py
@@ -25,8 +25,6 @@ import mock
from alot.commands import globals as g_commands
-from .. import utilities
-
class Stop(Exception):
"""exception for stopping testing of giant unmanagable functions."""
@@ -136,7 +134,6 @@ class TestExternalCommand(unittest.TestCase):
cmd.apply(ui)
ui.notify.assert_not_called()
- @utilities.expected_failure
def test_no_spawn_no_stdin_attached(self):
ui = mock.Mock()
cmd = g_commands.ExternalCommand(u'test -t 0', refocus=False)