Copilot commented on code in PR #635:
URL: https://github.com/apache/ranger/pull/635#discussion_r2658315463
##########
security-admin/scripts/db_setup.py:
##########
@@ -151,7 +151,7 @@ def dbversionBasedOnUserName(userName):
return version
def set_env_val(command):
- proc = subprocess.Popen(command, stdout = subprocess.PIPE)
+ proc = subprocess.Popen(command, stdout = subprocess.PIPE, text=True)
for line in proc.stdout:
(key, _, value) = line.decode('utf8').partition('=')
Review Comment:
The `.decode('utf8')` call is no longer needed since `text=True` already
converts stdout to text. This will cause an `AttributeError` because strings
don't have a `decode()` method. Remove the `.decode('utf8')` call.
```suggestion
(key, _, value) = line.partition('=')
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]