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

oleobj.py syntax error #855

Merged
merged 1 commit into from
May 28, 2024
Merged

oleobj.py syntax error #855

merged 1 commit into from
May 28, 2024

Conversation

xambroz
Copy link
Contributor

@xambroz xambroz commented May 4, 2024

In python 3.12+ this escaping is reported as syntax error. Moving the dash to the end of the regex avoids the need for escaping it.

oletools/oleobj.py:537
/rpmbuild/BUILD/oletools-78b2d459a33df378a4f69ffc6c33313509cecfe4/oletools/oleobj.py:537: SyntaxWarning: invalid escape sequence '-'
sane_fname = re.sub(u'[^a-zA-Z0-9.\-_ ]', replacement, basepath)

In python 3.12+ this escaping is reported as syntax error. Moving the dash to the end of the regex avoids the need for escaping it.

oletools/oleobj.py:537
  /rpmbuild/BUILD/oletools-78b2d459a33df378a4f69ffc6c33313509cecfe4/oletools/oleobj.py:537: SyntaxWarning: invalid escape sequence '\-'
    sane_fname = re.sub(u'[^a-zA-Z0-9.\-_ ]', replacement, basepath)
Copy link
Owner

@decalage2 decalage2 left a comment

Choose a reason for hiding this comment

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

@decalage2 decalage2 merged commit edc004f into decalage2:master May 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants