You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/21 07:18:29 UTC
[GitHub] [airflow] uranusjr commented on a change in pull request #21694: set maxsplit to be 1 of line split in _parse_env_file function
uranusjr commented on a change in pull request #21694:
URL: https://github.com/apache/airflow/pull/21694#discussion_r810834007
##########
File path: airflow/secrets/local_filesystem.py
##########
@@ -74,7 +74,7 @@ def _parse_env_file(file_path: str) -> Tuple[Dict[str, List[str]], List[FileSynt
# Ignore comments
continue
- var_parts: List[str] = line.split("=", 2)
+ var_parts: List[str] = line.split("=", 1)
Review comment:
It would be easier to use `partition` here.
```python
key, sep, value = line.partition("=")
if not sep:
errors.append(...)
continue
if not key:
errors.append(...)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org