Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix error when mc admin response has a trailing newline (#1099)
To avoid empty strings after splitting `proc.stdout`, `splitlines` is used instead of `split`. To avoid errors when `proc.stdout` itself is empty, an additional guard has been added. In this case, an empty list or dictionary is returned, depending on `multiline`. Also, `text=True` is passed `subprocess.run` to ensure `proc.stdout` is a string and not bytes object.
- Loading branch information