| skipped 465 lines |
466 | 466 | | |
467 | 467 | | def __end(self, database="", table="", fetched=True): |
468 | 468 | | new_line = "" |
469 | | - | # if database and table: |
470 | | - | # filepath = os.path.join(self._filepath, "dump") |
471 | | - | # filepath = os.path.join(filepath, database) |
472 | | - | # filepath = os.path.join(filepath, f"{table}.csv") |
473 | | - | # message = ( |
474 | | - | # f"{new_line}table '{database}.{table}' dumped to CSV file '{filepath}'" |
475 | | - | # ) |
476 | | - | # logger.info(message) |
477 | | - | # new_line = "" |
| 469 | + | if database and table: |
| 470 | + | filepath = os.path.join(conf.filepaths.filepath, "dump") |
| 471 | + | filepath = os.path.join(filepath, database) |
| 472 | + | filepath = os.path.join(filepath, f"{table}.csv") |
| 473 | + | message = f"\ntable '{database}.{table}' dumped to CSV file '{filepath}'" |
| 474 | + | logger.info(message) |
| 475 | + | new_line = "" |
478 | 476 | | if fetched: |
479 | 477 | | logger.info( |
480 | 478 | | f"{new_line}fetched data logged to text files under '{self._filepath}'" |
481 | 479 | | ) |
482 | | - | logger.end("ending") |
| 480 | + | logger.end("ending") |
483 | 481 | | |
484 | 482 | | def extract_banner(self): |
485 | 483 | | response = target.fetch_banner( |
| skipped 238 lines |
724 | 722 | | ) |
725 | 723 | | fetched = response.ok |
726 | 724 | | if fetched: |
727 | | - | logger.success("") |
728 | 725 | | if not dump_requested: |
| 726 | + | logger.success("") |
729 | 727 | | self.__end(database=database, table=table, fetched=fetched) |
730 | 728 | | else: |
731 | 729 | | if not dump_requested: |
| skipped 55 lines |