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:
Родитель
989f62fb97
Коммит
8a35bf030b
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче