handle empty but defined SHELL env

Sometimes SHELL can be '',
which should be treated the same as undefined.
This commit is contained in:
Min RK 2015-04-12 10:28:14 -07:00
parent 44ae68da77
commit 95089fa22c

View File

@ -13,7 +13,7 @@ from .handlers import TerminalHandler, TermSocket
from . import api_handlers
def initialize(webapp):
shell = os.environ.get('SHELL', 'sh')
shell = os.environ.get('SHELL') or 'sh'
terminal_manager = webapp.settings['terminal_manager'] = NamedTermManager(shell_command=[shell])
terminal_manager.log = app_log
base_url = webapp.settings['base_url']