#NEWLINE# def rollback( self ) : #NEWLINE# #INDENT# 'Rollback the changes previously made by remove().' #NEWLINE# if ( self . save_dir is None ) : #NEWLINE# #INDENT# logger . error ( "Can't roll back %s; was not uninstalled" , path . dist . project_name ) #NEWLINE# return False #NEWLINE# #UNINDENT# logger . info ( 'Rolling back uninstall of %s' , self . dist . project_name ) #NEWLINE# for path in self . _moved_paths : #NEWLINE# #INDENT# tmp_path = self . _stash ( path ) #NEWLINE# logger . debug ( 'Replacing %s' , path ) #NEWLINE# renames ( tmp_path , path ) #NEWLINE# #UNINDENT# for pth in self . pth . values ( ) : #NEWLINE# #INDENT# pth . rollback ( )