Message176062
Just checking in to point out a possible problem with the code that strips the MSVCR dependency from the embedded manifest. The used regexpr is too greedy: the first bit can trigger on an earlier "assemblyIdentity" tag, so that after the removal the manifest is no longer valid XML.
The key problem is that the "<assemblyIdentity" and the name attribute are allowed to be on a separate lines. To fix this I removed the re.DOTALL flag and replaced the second occurrence of ".*?" to also allow newlines:
pattern = re.compile(
- r"""<assemblyIdentity.*?name=("|')Microsoft\."""\
- r"""VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)""",
- re.DOTALL)
+ r"""<assemblyIdentity.*?name=("|')Microsoft\."""\
+ r"""VC\d{2}\.CRT("|')(.|\r|\r)*?(/>|</assemblyIdentity>)""")
It is well possible that the problem does not causes any problems for the intended usage of the code. I'm using the code to strip other DLL's and ran into this issue (with tk85.dll to be precise).
- Almar |
|
Date |
User |
Action |
Args |
2012-11-21 15:45:09 | almar | set | recipients:
+ almar, loewis, mhammond, mark.dickinson, sable, eric.smith, techtonik, koen, tarek, eric.araujo, cgohlke, Garen, alexis, John.Cary, python-dev, abenard |
2012-11-21 15:45:08 | almar | set | messageid: <1353512708.41.0.719254709994.issue7833@psf.upfronthosting.co.za> |
2012-11-21 15:45:08 | almar | link | issue7833 messages |
2012-11-21 15:45:07 | almar | create | |
|