Skip to content

Commit 03b359b

Browse files
committed
fix: linter errors
1 parent 5ca6a4c commit 03b359b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

aws_advanced_python_wrapper/utils/rdsutils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def is_rds_custom_cluster_dns(self, host: str) -> bool:
126126

127127
def is_rds_dns(self, host: str) -> bool:
128128
if not host or not host.strip():
129-
return None
129+
return False
130130

131131
pattern = self._find(host, [RdsUtils.AURORA_DNS_PATTERN,
132132
RdsUtils.AURORA_CHINA_DNS_PATTERN,
@@ -235,9 +235,13 @@ def _find(self, host: str, patterns: list):
235235
match = RdsUtils.CACHE_DNS_PATTERNS.get(host)
236236
if match:
237237
return match
238-
else:
239-
match = search(pattern, host)
238+
239+
match = search(pattern, host)
240+
if match:
240241
RdsUtils.CACHE_DNS_PATTERNS[host] = match
242+
return match
243+
244+
return None
241245

242246
def _get_regex_group(self, pattern: Match[str], group_name: str):
243247
return pattern.group(group_name)

0 commit comments

Comments
 (0)