Skip to content

Commit 00d5eaa

Browse files
committed
python: adjust imports, indentation, unused variables following pylint advice
1 parent 644d7e7 commit 00d5eaa

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/journal-remote/log-generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
DATA={data}
3030
"""
3131

32-
m = 0x198603b12d7
32+
m = 0x198603b12d7
3333
realtime_ts = 1404101101501873
3434
monotonic_ts = 1753961140951
3535
source_realtime_ts = 1404101101483516
@@ -71,5 +71,5 @@
7171
print('.', file=sys.stderr, end='', flush=True)
7272

7373
if OPTIONS.dots:
74-
print(file=sys.stderr)
74+
print(file=sys.stderr)
7575
print('Wrote {} bytes'.format(bytes), file=sys.stderr)

test/networkd-test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def do_test(self, coldplug=True, ipv6=False, extra_opts='',
153153
# check iface state and IP 6 address; FIXME: we need to wait a bit
154154
# longer, as the iface is "configured" already with IPv4 *or*
155155
# IPv6, but we want to wait for both
156-
for timeout in range(10):
156+
for _ in range(10):
157157
out = subprocess.check_output(['ip', 'a', 'show', 'dev', self.iface])
158158
if b'state UP' in out and b'inet6 2600' in out and b'inet 192.168' in out:
159159
break
@@ -558,7 +558,7 @@ def create_iface(self, ipv6=False, dhcpserver_opts=None):
558558
'--service-type=notify', script])
559559

560560
# wait until devices got created
561-
for timeout in range(50):
561+
for _ in range(50):
562562
out = subprocess.check_output(['ip', 'a', 'show', 'dev', self.if_router])
563563
if b'state UP' in out and b'scope global' in out:
564564
break

test/sysv-generator-test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def test_provides_escaped(self):
308308
err, results = self.run_generator()
309309
self.assertEqual(list(results), ['foo.service'])
310310
self.assertEqual(os.readlink(os.path.join(self.out_dir, 'foo\\x2b.service')),
311-
'foo.service')
311+
'foo.service')
312312
self.assertNotIn('Overwriting', err)
313313

314314
def test_same_provides_in_multiple_scripts(self):

0 commit comments

Comments
 (0)