Skip to content

Commit

Permalink
error debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD committed Jul 15, 2024
1 parent e3eb167 commit 2346b76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/dandi_s3_log_parser/_ip_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import ipaddress
import hashlib
import traceback
import importlib
import datetime
from typing import List
from importlib.metadata import version as importlib_version

import ipinfo
import requests
Expand Down Expand Up @@ -103,7 +103,7 @@ def _get_region_from_ip_address(ip_hash_to_region: dict[str, str], ip_address: s
errors_folder_path = DANDI_S3_LOG_PARSER_BASE_FOLDER_PATH / "errors"
errors_folder_path.mkdir(exist_ok=True)

dandi_s3_log_parser_version = importlib.metadata.version("dandi_s3_log_parser")
dandi_s3_log_parser_version = importlib_version(distribution_name="dandi_s3_log_parser")
date = datetime.datetime.now().strftime("%y%m%d")
lines_errors_file_path = errors_folder_path / f"v{dandi_s3_log_parser_version}_{date}_ipinfo_errors.txt"

Expand Down
4 changes: 2 additions & 2 deletions src/dandi_s3_log_parser/_s3_log_line_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

import collections
import datetime
import importlib
import pathlib
import re
from importlib.metadata import version as importlib_version

from ._config import DANDI_S3_LOG_PARSER_BASE_FOLDER_PATH
from ._ip_utils import _get_region_from_ip_address
Expand Down Expand Up @@ -104,7 +104,7 @@ def _get_full_log_line(
errors_folder_path = DANDI_S3_LOG_PARSER_BASE_FOLDER_PATH / "errors"
errors_folder_path.mkdir(exist_ok=True)

dandi_s3_log_parser_version = importlib.metadata.version("dandi_s3_log_parser")
dandi_s3_log_parser_version = importlib_version(distribution_name="dandi_s3_log_parser")
date = datetime.datetime.now().strftime("%y%m%d")
lines_errors_file_path = errors_folder_path / f"v{dandi_s3_log_parser_version}_{date}_lines_errors.txt"

Expand Down

0 comments on commit 2346b76

Please sign in to comment.