Skip to content
Snippets Groups Projects
Commit 03e289bb authored by sand's avatar sand
Browse files

use proper escaping for regexp

parent d706360c
No related branches found
No related tags found
1 merge request!2pgpy instead of python-gnupg
...@@ -158,7 +158,7 @@ def _openpgp_mangle_for_signature(msg): ...@@ -158,7 +158,7 @@ def _openpgp_mangle_for_signature(msg):
g = rfc3156.RFC3156CompliantGenerator( g = rfc3156.RFC3156CompliantGenerator(
fp, mangle_from_=False, maxheaderlen=76) fp, mangle_from_=False, maxheaderlen=76)
g.flatten(msg) g.flatten(msg)
s = re.sub('\r?\n', '\r\n', fp.getvalue()) s = re.sub(r'\r?\n', '\r\n', fp.getvalue())
if msg.is_multipart(): if msg.is_multipart():
if not s.endswith('\r\n'): if not s.endswith('\r\n'):
s += '\r\n' s += '\r\n'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment