Skip to content

Invalid escape sequence warning in builder RewriteRule #951

Description

@janbrasna

This probably was triggered by a --debug build:

/Sites/thunderbird-website/builder.py:348: SyntaxWarning: invalid escape sequence '\.'
  'RewriteRule ^(115\.[^/]+)esr/(.*)$ /thunderbird/$1/$2 [R,L]\n'
/Sites/thunderbird-website/builder.py:350: SyntaxWarning: invalid escape sequence '\.'
  'RewriteRule ^(115\.[^/]+)/(.*)$ /thunderbird/$1esr/$2 [R,L]\n'

So I'm guessing that:

'RewriteRule ^(115\.[^/]+)esr/(.*)$ /thunderbird/$1/$2 [R,L]\n'
'RewriteCond %{REQUEST_FILENAME} !-d\n'
'RewriteRule ^(115\.[^/]+)/(.*)$ /thunderbird/$1esr/$2 [R,L]\n'

either needs \\. to escape for python and then for regexp… or using a r'…' raw string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Estimate

    None yet

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions