[Git][reproducible-builds/diffoscope][master] 2 commits: Don't call re.compile and then call .sub on the result; just call re.sub directly.
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Fri May 27 15:41:15 UTC 2022
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
5be08156 by Chris Lamb at 2022-05-27T16:35:35+01:00
Don't call re.compile and then call .sub on the result; just call re.sub directly.
- - - - -
c6153ea8 by Chris Lamb at 2022-05-27T16:39:28+01:00
Strip "sticky" etc. from "x.deb: sticky Debian binary package […]". Thanks to David Prévot for the report. (Closes: Debian:#1011635)
- - - - -
1 changed file:
- diffoscope/comparators/utils/file.py
Changes:
=====================================
diffoscope/comparators/utils/file.py
=====================================
@@ -400,9 +400,11 @@ class File(metaclass=abc.ABCMeta):
# gzip compressed data as this is just a symptom of the contents itself
# changing that will be reflected elsewhere.
if val.startswith("gzip compressed data"):
- val = re.compile(r", original size modulo 2\^\d+ \d+$").sub(
- "", val
- )
+ val = re.sub(r", original size modulo 2\^\d+ \d+$", "", val)
+
+ # Strip "sticky" etc. from "x.deb: sticky Debian binary package […]"
+ # See (#1011635)
+ val = re.sub(r"^(sticky|setuid|setgid)\s", "", val)
return val
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/7131cab24fcbe6f9eab2cfe8f675a0e49ec540fc...c6153ea88374864082f0a71c45a17887dd18a199
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/7131cab24fcbe6f9eab2cfe8f675a0e49ec540fc...c6153ea88374864082f0a71c45a17887dd18a199
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20220527/2d8800fe/attachment.htm>
More information about the rb-commits
mailing list