Skip to content

Commit ecc869c

Browse files
committed
Move common return to end of function
1 parent d1137b4 commit ecc869c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

google/api_core/_python_version_support.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,10 @@ def _get_pypi_package_name(module_name):
172172
if module_name in module_to_distributions: # pragma: NO COVER
173173
# The value is a list of distribution names, take the first one
174174
return module_to_distributions[module_name][0]
175-
else:
176-
return None # Module not found in the mapping
177175
except Exception as e:
178176
_LOGGER.error("An error occurred: %s", e)
179-
return None
177+
178+
return None
180179

181180

182181
def _get_distribution_and_import_packages(import_package: str) -> Tuple[str, Any]:

0 commit comments

Comments
 (0)