Skip to content

Commit b1804d5

Browse files
author
xianglongfei
committed
fix: System_output returns a byte string (bytes), not a string (str).
1 parent 74b7379 commit b1804d5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

avocado/utils/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def can_sudo(cmd=None):
7979
try:
8080
if cmd: # Am I able to run the cmd or plain sudo id?
8181
return not system(cmd, ignore_status=True, sudo=True)
82-
if system_output("id -u", ignore_status=True, sudo=True).strip() == "0":
82+
if getoutput("id -u", sudo=True).strip() == "0":
8383
return True
8484
return False
8585
except OSError: # Broken sudo binary

0 commit comments

Comments
 (0)