Skip to content

Commit a1282fa

Browse files
committed
chore: cleanup functions/files no longer needed
Signed-off-by: Terri Oda <[email protected]>
1 parent a79cafa commit a1282fa

File tree

3 files changed

+0
-255
lines changed

3 files changed

+0
-255
lines changed

cve_bin_tool/cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
ErrorMode,
6565
InsufficientArgs,
6666
InvalidExtensionError,
67-
MirrorError,
6867
PDFOutputUnavailable,
6968
VEXError,
7069
excepthook,

cve_bin_tool/cvedb.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import sqlite3
1616
import tempfile
1717
from datetime import date
18-
from os import utime
1918
from pathlib import Path
2019
from typing import Any
2120

@@ -38,7 +37,6 @@
3837
OLD_CACHE_DIR,
3938
)
4039
from cve_bin_tool.error_handler import ERROR_CODES, CVEDBError, ErrorMode, SigningError
41-
from cve_bin_tool.fetch_json_db import Fetch_JSON_DB
4240
from cve_bin_tool.log import LOGGER
4341
from cve_bin_tool.util import make_http_requests
4442
from cve_bin_tool.version import check_latest_version
@@ -1156,32 +1154,6 @@ def json_to_db_wrapper(self, path, pubkey, ignore_signature, log_signature_error
11561154
)
11571155
return -1
11581156

1159-
def fetch_from_mirror(self, mirror, pubkey, ignore_signature, log_signature_error):
1160-
"""Get JSON information from download mirror."""
1161-
if not self.cachedir.exists():
1162-
self.cachedir.mkdir()
1163-
json_db = Fetch_JSON_DB(
1164-
mirror=mirror,
1165-
pubkey=pubkey,
1166-
ignore_signature=ignore_signature,
1167-
cache_dir=self.cachedir,
1168-
log_signature_error=log_signature_error,
1169-
error_mode=self.error_mode,
1170-
)
1171-
run_coroutine(json_db.handle_download())
1172-
json_data_path = self.cachedir / "json_data"
1173-
if (json_data_path / "metadata.json").exists() and self.json_to_db_wrapper(
1174-
path=json_data_path,
1175-
pubkey=pubkey,
1176-
ignore_signature=ignore_signature,
1177-
log_signature_error=log_signature_error,
1178-
) != -1:
1179-
self.time_of_last_update = json_db.metadata["timestamp"]
1180-
utime(self.dbpath, (self.time_of_last_update, self.time_of_last_update))
1181-
else:
1182-
self.clear_cached_data()
1183-
return -1
1184-
11851157
@contextlib.contextmanager
11861158
def with_cursor(self):
11871159
"""Context manager for database cursor."""

cve_bin_tool/fetch_json_db.py

Lines changed: 0 additions & 226 deletions
This file was deleted.

0 commit comments

Comments
 (0)