We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 718cefe commit 2e3e974Copy full SHA for 2e3e974
setup.py
@@ -7,11 +7,9 @@
7
class build_ext_generate_id128_header(build_ext):
8
def run(self):
9
if not self.dry_run and not os.path.exists("systemd/id128-constants.h"):
10
- constants = []
11
- with open("/usr/include/systemd/sd-messages.h") as f:
12
- for line in f:
13
- if line.startswith('#define SD'):
14
- constants.append(line.split()[1])
+ constants = [line.split()[1]
+ for line in open("/usr/include/systemd/sd-messages.h")
+ if line.startswith('#define SD_MESSAGE_')]
15
16
with open("systemd/id128-constants.h", "w") as f:
17
for c in constants:
0 commit comments