def _python_shell_default(python_shell, __pub_jid):
 try:
  if (__pub_jid and (python_shell is None)):
   return True
  elif ((__opts__.get('cmd_safe', True) is False) and (python_shell is None)):
   return True
 except NameError:
  pass
 return python_shell

def _python_shell_default ( python_shell , __pub_jid ) : try : if ( __pub_jid and ( python_shell is None ) ) : return True elif ( ( __opts__ . get ( 'cmd_safe' , True ) is False ) and ( python_shell is None ) ) : return True except NameError : pass return python_shell
set python_shell default based on remote execution and __opts__[cmd_safe] .