#NEWLINE# def _check_and_uninstall_python( ret , python , user = None ) : #NEWLINE# #INDENT# '\n    Verify that python is uninstalled\n    ' #NEWLINE# ret = _python_installed ( ret , python , user = user ) #NEWLINE# if ret [ 'result' ] : #NEWLINE# #INDENT# if ret [ 'default' ] : #NEWLINE# #INDENT# __salt__ [ 'pyenv.default' ] ( 'system' , runas = user ) #NEWLINE# #UNINDENT# if __salt__ [ 'pyenv.uninstall_python' ] ( python , runas = user ) : #NEWLINE# #INDENT# ret [ 'result' ] = True #NEWLINE# ret [ 'changes' ] [ ret ] = 'Uninstalled' #NEWLINE# ret [ 'comment' ] = 'Successfully removed python' #NEWLINE# return ret #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ret [ 'result' ] = False #NEWLINE# ret [ 'comment' ] = 'Failed to uninstall python' #NEWLINE# return ret #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# ret [ 'result' ] = True #NEWLINE# ret [ 'comment' ] = 'python {0} is already absent' . format ( python ) #NEWLINE# #UNINDENT# return ret