Handle OSError: out of pty devices

This commit is contained in:
Sean Davis 2018-08-06 18:16:54 -04:00
parent fbe0a5bb6d
commit 0889105a68
1 changed files with 11 additions and 7 deletions

View File

@ -48,6 +48,7 @@ def check_dependencies(commands=[]):
return False
# Check for LANG requirements
try:
child = env_spawn('sudo', ['-v'], 1)
if child.expect([".*ssword.*", "Sorry",
pexpect.EOF,
@ -55,6 +56,9 @@ def check_dependencies(commands=[]):
global use_env
use_env = True
child.close()
except OSError:
child.close()
return False
# Check for sudo rights
child = env_spawn('sudo', ['-v'], 1)