Handle OSError: out of pty devices
This commit is contained in:
parent
fbe0a5bb6d
commit
0889105a68
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue