Skip to content

Commit

Permalink
updated logging due to linting errors W1203
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoHuebner authored and pmayd committed Sep 4, 2022
1 parent b1824b2 commit c869d4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pygenesis/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ def clean_cache(file: Optional[str] = None) -> None:
elif file_path.is_dir():
shutil.rmtree(file_path)
except (OSError, ValueError, FileNotFoundError) as e:
logger.warning(f"Failed to delete {file_path}. Reason: {e}")
logger.warning("Failed to delete %s. Reason: %s", file_path, e)

logger.info(f"Removed files: {file_paths}")
logger.info("Removed files: %s", file_paths)
4 changes: 3 additions & 1 deletion src/pygenesis/http_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,6 @@ def _check_destatis_status(destatis_status: dict) -> None:
# output information to user
# TODO: Would logger.info (with forced visibility) be the better option?
elif destatis_status_type.lower() == "information":
logger.info(f"Code {destatis_status_code}: {destatis_status_content}")
logger.info(
"Code %d : %s", destatis_status_code, destatis_status_content
)

0 comments on commit c869d4d

Please sign in to comment.