Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Error: bad escape \\s at position 0 #5420

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Fix Error: bad escape \\s at position 0 #5420

merged 1 commit into from
Feb 6, 2024

Conversation

misanjumn
Copy link
Contributor

Fix Error: bad escape \s at position 0

From python3.7, using '\s' leads to re ERROR
In python3.6 and below, the same was treated as DeprecationWarning
Hence replacing '\s' in the code simply with ' ' will work

Source: github-python/cpython-issues#27030
Source: stack-overflow-bad-escape

Signed-off-by: Misbah Anjum N [email protected]

From python3.7, using '\s' leads to re error
In python3.6 and below, the same was treated as DeprecationWarning
Hence replacing '\s' in the code simply with ' ' will work

Signed-off-by: Misbah Anjum N <[email protected]>
@misanjumn
Copy link
Contributor Author

running lifecycle.cfg in avocado-vt

Before this commit:-
Test 828 and 831: ERROR

(0828/1018) type_specific.io-github-autotest-libvirt.virsh.domxml_from_native.unexpect_option.exist_file_guest_args:  ERROR: bad escape \s at position 0 (1304.06 s)
(0831/1080) type_specific.io-github-autotest-libvirt.virsh.domxml_from_native.unexpect_option.with_libvirtd_stop:  ERROR: bad escape \s at position 0 (25.10 s)

After this commit:-
Test 828 and 831: PASS

(0828/1018) type_specific.io-github-autotest-libvirt.virsh.domxml_from_native.unexpect_option.exist_file_guest_args:  PASS (25.87 s)
(0831/1080) type_specific.io-github-autotest-libvirt.virsh.domxml_from_native.unexpect_option.with_libvirtd_stop:  PASS (26.05 s)

Copy link
Contributor

@bskjois bskjois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@chunfuwen chunfuwen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chunfuwen chunfuwen merged commit 87641e2 into autotest:master Feb 6, 2024
5 checks passed
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