aboutsummaryrefslogtreecommitdiffstats
path: root/debian/lib/python/debian_linux/debian.py
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2018-09-11 00:33:40 +0100
committerBen Hutchings <ben@decadent.org.uk>2018-09-11 00:33:40 +0100
commit399eeb4b113620efb1df358ebf35c1be51b11f01 (patch)
treedce204cb32990a09b93d1b13d87fef15a2f7bd51 /debian/lib/python/debian_linux/debian.py
parent0a74c462f0d636b10227a98211c9df98ea298ce7 (diff)
downloadkernel_replicant_linux-399eeb4b113620efb1df358ebf35c1be51b11f01.tar.gz
kernel_replicant_linux-399eeb4b113620efb1df358ebf35c1be51b11f01.tar.bz2
kernel_replicant_linux-399eeb4b113620efb1df358ebf35c1be51b11f01.zip
debian/lib/python: Use raw strings for all regexes
Several regexes were written as normal strings. Thankfully it appears that none of the backslash-escaped sequences in them are parsed in normal strings, so this shouldn't make any practical difference.
Diffstat (limited to 'debian/lib/python/debian_linux/debian.py')
-rw-r--r--debian/lib/python/debian_linux/debian.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py
index afc956ef002a..b67678d05af7 100644
--- a/debian/lib/python/debian_linux/debian.py
+++ b/debian/lib/python/debian_linux/debian.py
@@ -421,7 +421,7 @@ class PackageArchitecture(collections.MutableSet):
def extend(self, value):
if isinstance(value, str):
- for i in re.split('\s', value.strip()):
+ for i in re.split(r'\s', value.strip()):
self.add(i)
else:
raise RuntimeError
@@ -493,7 +493,7 @@ class PackageRelation(list):
def extend(self, value, override_arches=None):
if isinstance(value, str):
- value = (j.strip() for j in re.split(',', value.strip()))
+ value = (j.strip() for j in re.split(r',', value.strip()))
for i in value:
self.append(i, override_arches)
@@ -529,7 +529,7 @@ class PackageRelationGroup(list):
def extend(self, value, override_arches=None):
if isinstance(value, str):
- value = (j.strip() for j in re.split('\|', value.strip()))
+ value = (j.strip() for j in re.split(r'\|', value.strip()))
for i in value:
self.append(i, override_arches)
@@ -612,11 +612,11 @@ class PackageRelationEntry(object):
self.operator = None
self.version = match[2]
if match[3] is not None:
- self.arches = re.split('\s+', match[3])
+ self.arches = re.split(r'\s+', match[3])
else:
self.arches = []
if match[4] is not None:
- self.restrictions = re.split('\s+', match[4])
+ self.restrictions = re.split(r'\s+', match[4])
else:
self.restrictions = []