Fix error when using @arg for stdin and no match found

This commit is contained in:
Kovid Goyal 2017-10-20 18:02:39 +05:30
parent aaf94b61ed
commit b7e8bd2faf
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -307,7 +307,9 @@ class Boss:
return w.buffer_as_text()
if args[0].startswith('@'):
stdin = data_for_at(args[0]).encode('utf-8')
stdin = data_for_at(args[0]) or None
if stdin is not None:
stdin = stdin.encode('utf-8')
del args[0]
cmd = []