]> git.ipfire.org Git - thirdparty/systemd.git/commit
make-autosuspend-rules: restore compatibility with Python3 < 3.6
authorLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 23 Jun 2020 10:45:50 +0000 (11:45 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 23 Jun 2020 19:02:15 +0000 (21:02 +0200)
commit87d25bdead80fa924c5307438c247a992690cbd6
tree25cc23ee6dc583627bc5d01ee5336d09cff0deb8
parent21385e639acfaed4aa5fb810b12d43e3c8696925
make-autosuspend-rules: restore compatibility with Python3 < 3.6

The f'...' format was introduced in Python 3.6 ( https://www.python.org/dev/peps/pep-0498/ )
and returns an error when systemd is built on a system with an older Python3 version:

<...>
  File /home/bluca/git/systemd/tools/make-autosuspend-rules.py, line 15
    print(f'pci:v{vendor:08X}d{device:08X}*')
                                           ^
SyntaxError: invalid syntax
[2/388] Generating version.h with a custom command.
ninja: build stopped: subcommand failed.
$ python3 --version
Python 3.5.6

Use an older format to keep backward compatibility.
tools/make-autosuspend-rules.py