localpdb/PDBDownloader.py
def clean_unsuccessful(self):
        """
        Cleans the files downloaded during the session.
        This function is run when some part of the download session has failed.
        """
        if self.remove_unsuccessful:
            rm_strings = [f'{self.db_path}/data/{self.version}', f'{self.db_path}/clustering{self.version}']
            try:
                shutil.move(f'{self.db_path}/data/.versioning.log.bk', f'{self.db_path}/data/versioning.log')
            except FileNotFoundError:
                pass
            for s in rm_strings:
                try:
                    shutil.rmtree(s)
                except FileNotFoundError:
                    pass
            for org_fn, dest_fn in self.cp_files:
                try:
                    shutil.copy2(dest_fn, org_fn)
                    logger.debug(f'Moved file\'{dest_fn}\' to \'{org_fn}\'.')
                    os.remove(dest_fn)
                except FileNotFoundError:
                    pass

        self.remove_lock()

        Cleans the files downloaded during the session.
        This function is run when some part of the download session has failed.
        
Cleans the files downloaded during the session.
This function is run when some part of the download session has failed.
Cleans the files downloaded during the session . This function is run when some part of the download session has failed .
def clean_unsuccessful(self):
        if self.remove_unsuccessful:
            rm_strings = [f'{self.db_path}/data/{self.version}', f'{self.db_path}/clustering{self.version}']
            try:
                shutil.move(f'{self.db_path}/data/.versioning.log.bk', f'{self.db_path}/data/versioning.log')
            except FileNotFoundError:
                pass
            for s in rm_strings:
                try:
                    shutil.rmtree(s)
                except FileNotFoundError:
                    pass
            for org_fn, dest_fn in self.cp_files:
                try:
                    shutil.copy2(dest_fn, org_fn)
                    logger.debug(f'Moved file\'{dest_fn}\' to \'{org_fn}\'.')
                    os.remove(dest_fn)
                except FileNotFoundError:
                    pass
        self.remove_lock()
def clean_unsuccessful ( self ) : if self . remove_unsuccessful : rm_strings = [ f'{self.db_path}/data/{self.version}' , f'{self.db_path}/clustering{self.version}' ] try : shutil . move ( f'{self.db_path}/data/.versioning.log.bk' , f'{self.db_path}/data/versioning.log' ) except FileNotFoundError : pass for s in rm_strings : try : shutil . rmtree ( s ) except FileNotFoundError : pass for org_fn , dest_fn in self . cp_files : try : shutil . copy2 ( dest_fn , org_fn ) logger . debug ( f'Moved file\'{dest_fn}\' to \'{org_fn}\'.' ) os . remove ( dest_fn ) except FileNotFoundError : pass self . remove_lock ( )
Cleans the files downloaded during the session.
Cleans the files downloaded during the session .
"""
        Cleans the files downloaded during the session.
        This function is run when some part of the download session has failed.
        """
self