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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

oleobj.py syntax error #855

wants to merge 1 commit into from

Conversation

xambroz
Copy link

@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)
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.

None yet

1 participant