mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
avoid key error is not SHELL env var
This commit is contained in:
parent
1e27703f3b
commit
b09114ec1d
@ -28,7 +28,10 @@ class CMDModuleTest(integration.ModuleCase):
|
||||
'''
|
||||
cmd.run
|
||||
'''
|
||||
shell = os.environ['SHELL']
|
||||
shell = os.environ.get('SHELL')
|
||||
if shell is None:
|
||||
# Failed to get the SHELL var, don't run
|
||||
return
|
||||
self.assertTrue(self.run_function('cmd.run', ['echo $SHELL']))
|
||||
self.assertEqual(
|
||||
self.run_function('cmd.run',
|
||||
|
Loading…
Reference in New Issue
Block a user