Python 3: remove deprecated U qualifier on 'open' (#3019)

The U qualifier (universal line endings) has no effect
in Python3. Remove its use to avoid a Python warning.
This commit is contained in:
David Neto 2019-11-07 08:39:09 -05:00 committed by dan sinclair
parent 989f62fb97
commit 8a35bf030b

View File

@ -86,7 +86,7 @@ def deduce_software_version(directory):
# Linux.
pattern = re.compile(r'^(v\d+\.\d+(-dev)?) \d\d\d\d-\d\d-\d\d\s*$')
changes_file = os.path.join(directory, 'CHANGES')
with open(changes_file, mode='rU') as f:
with open(changes_file, mode='r') as f:
for line in f.readlines():
match = pattern.match(line)
if match: