summaryrefslogtreecommitdiff
path: root/alot/commands/globals.py
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/commands/globals.py
parent4ee318a54a4a40f4afcb213199117b10464d8ed2 (diff)
Fix UnboundLocalError
The local variable proc was not defined in these branches.
Diffstat (limited to 'alot/commands/globals.py')
-rw-r--r--alot/commands/globals.py8
1 files changed, 4 insertions, 4 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: