| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c97b3a0 commit 6493118
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,12 +16,16 @@ | |||
| 16 | 16 | ||
| 17 | 17 | import datetime | |
| 18 | 18 | import enum | |
| 19 | + import logging | ||
| 19 | 20 | import warnings | |
| 20 | 21 | import sys | |
| 21 | 22 | import textwrap | |
| 22 | 23 | from typing import Any, List, NamedTuple, Optional, Dict, Tuple | |
| 23 | 24 | ||
| 24 | 25 | ||
| 26 | + _LOGGER = logging.getLogger(__name__) | ||
| 27 | + | ||
| 28 | + | ||
| 25 | 29 | class PythonVersionStatus(enum.Enum): | |
| 26 | 30 | """Support status of a Python version in this client library artifact release. | |
| 27 | 31 | ||
@@ -168,11 +172,14 @@ def _get_pypi_package_name(module_name): | |||
| 168 | 172 | if module_name in module_to_distributions: # pragma: NO COVER | |
| 169 | 173 | # The value is a list of distribution names, take the first one | |
| 170 | 174 | return module_to_distributions[module_name][0] | |
| 171 | - else: | ||
| 172 | - return None # Module not found in the mapping | ||
| 173 | 175 | except Exception as e: | |
| 174 | - print(f"An error occurred: {e}") | ||
| 175 | - return None | ||
| 176 | + _LOGGER.info( | ||
| 177 | + "An error occurred while determining PyPI package name for %s: %s", | ||
| 178 | + module_name, | ||
| 179 | + e, | ||
| 180 | + ) | ||
| 181 | + | ||
| 182 | + return None | ||
| 176 | 183 | ||
| 177 | 184 | ||
| 178 | 185 | def _get_distribution_and_import_packages(import_package: str) -> Tuple[str, Any]: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments