Skip to content

check_ceph_osd_db: Decode bytes output to string#85

Open
lbausch wants to merge 1 commit intoceph:masterfrom
lbausch:decode-bytes-output
Open

check_ceph_osd_db: Decode bytes output to string#85
lbausch wants to merge 1 commit intoceph:masterfrom
lbausch:decode-bytes-output

Conversation

@lbausch
Copy link

@lbausch lbausch commented Oct 14, 2022

Avoids TypeError: cannot use a string pattern on a bytes-like object when executing re.findall().

Popen.communicate() returns bytes if the streams weren't opened in text mode, which is not the case here, as far as I can tell. See https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate

Avoids `TypeError: cannot use a string pattern on a bytes-like object`
@jg-basis
Copy link

Noted this issue and it fixed the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants