Fix pycodestyle "inalid escape sequence" warnings

This commit is contained in:
Ben Hutchings 2018-12-28 15:28:23 +00:00
parent a54c09f109
commit f8450c79c8
4 changed files with 4 additions and 3 deletions

View File

@ -624,7 +624,7 @@ class Gencontrol(Base):
self.abiname_part = '-%s' % self.config['abi', ]['abiname']
# We need to keep at least three version components to avoid
# userland breakage (e.g. #742226, #745984).
self.abiname_version = re.sub('^(\d+\.\d+)(?=-|$)', r'\1.0',
self.abiname_version = re.sub(r'^(\d+\.\d+)(?=-|$)', r'\1.0',
self.version.linux_upstream)
self.vars = {
'upstreamversion': self.version.linux_upstream,

View File

@ -16,7 +16,7 @@ def merge(output, configs, overrides):
def opt_callback_dict(option, opt, value, parser):
match = re.match('^\s*(\S+)=(\S+)\s*$', value)
match = re.match(r'^\s*(\S+)=(\S+)\s*$', value)
if not match:
raise optparse.OptionValueError('not key=value')
dest = option.dest

1
debian/changelog vendored
View File

@ -15,6 +15,7 @@ linux (4.19.12-2) UNRELEASED; urgency=medium
* debian/lib/python/debian_linux/debian.py: Fix deprecated import of
MutableSet
* Fix pycodestyle "line break after binary operator" warnings
* Fix pycodestyle "inalid escape sequence" warnings
[ Salvatore Bonaccorso ]
* USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

View File

@ -3,7 +3,7 @@ import re
import sys
for line in open(sys.argv[1]):
match = re.search('getopt\(argc, argv, "([\w:]*?)"\)', line)
match = re.search(r'getopt\(argc, argv, "([\w:]*?)"\)', line)
if match:
options = match.group(1)
break