summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorLucas Hoffmann <lucc@posteo.de>2019-08-15 23:40:44 +0200
committerPatrick Totzke <patricktotzke@gmail.com>2019-08-16 10:11:18 +0100
commitd5f7a506bfe5257d952eee019427caf096adce0c (patch)
tree5a2df0aae55ec20031135f8ce2af8dcaf9b57782 /alot
parent4ee318a54a4a40f4afcb213199117b10464d8ed2 (diff)
Fix UnboundLocalError
The local variable proc was not defined in these branches.
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/globals.py8
-rw-r--r--alot/helper.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index c1e8d3cf..993397b5 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -280,10 +280,10 @@ class ExternalCommand(Command):
ret = str(e)
else:
_, err = await proc.communicate(stdin.read() if stdin else None)
- if proc.returncode == 0:
- ret = 'success'
- elif err:
- ret = err.decode(urwid.util.detected_encoding)
+ if proc.returncode == 0:
+ ret = 'success'
+ elif err:
+ ret = err.decode(urwid.util.detected_encoding)
else:
with ui.paused():
try:
diff --git a/alot/helper.py b/alot/helper.py
index 79b97ccb..7758dd52 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -302,7 +302,7 @@ async def call_cmd_async(cmdlist, stdin=None, env=None):
handle.
If such an `OSError` is caught, then returncode will be set to 1, and the
- error value will be set to the str() method fo the exception.
+ error value will be set to the str() value of the exception.
:type cmdlist: list of str
:param stdin: string to pipe to the process