#NEWLINE# def _create_local_paths( env ) : #NEWLINE# #INDENT# 'Expand any paths defined in terms of shell shortcuts (like ~).\n    ' #NEWLINE# with settings ( hide ( 'warnings' , 'running' , 'stdout' , 'stderr' ) , warn_only = True ) : #NEWLINE# #INDENT# env . logger . info ( 'Now, testing connection to host...' ) #NEWLINE# test = env . safe_run ( 'pwd' ) #NEWLINE# if ( test != None ) : #NEWLINE# #INDENT# env . logger . info ( 'Connection to host appears to work!' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise NotImplementedError ( 'Connection to host failed' ) #NEWLINE# #UNINDENT# env . logger . debug ( 'Expand paths' ) #NEWLINE# if ( 'local_install' in env ) : #NEWLINE# #INDENT# if ( not env . safe_exists ( env . local_install ) ) : #NEWLINE# #INDENT# env . safe_sudo ( ( 'mkdir -p %s' % env . local_install ) ) #NEWLINE# user = env . safe_run_output ( 'echo $USER' ) #NEWLINE# env . safe_sudo ( ( 'chown -R %s %s' % ( user , env . local_install ) ) ) #NEWLINE# #UNINDENT# with cd ( env . local_install ) : #NEWLINE# #INDENT# result = env . safe_run_output ( 'pwd' ) #NEWLINE# env . local_install = result