python: adjust imports, indentation, unused variables following pylint advice
This commit is contained in:
parent
644d7e7610
commit
00d5eaafd1
|
@ -29,7 +29,7 @@ _SOURCE_REALTIME_TIMESTAMP={source_realtime_ts}
|
||||||
DATA={data}
|
DATA={data}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
m = 0x198603b12d7
|
m = 0x198603b12d7
|
||||||
realtime_ts = 1404101101501873
|
realtime_ts = 1404101101501873
|
||||||
monotonic_ts = 1753961140951
|
monotonic_ts = 1753961140951
|
||||||
source_realtime_ts = 1404101101483516
|
source_realtime_ts = 1404101101483516
|
||||||
|
@ -71,5 +71,5 @@ for i in range(OPTIONS.n):
|
||||||
print('.', file=sys.stderr, end='', flush=True)
|
print('.', file=sys.stderr, end='', flush=True)
|
||||||
|
|
||||||
if OPTIONS.dots:
|
if OPTIONS.dots:
|
||||||
print(file=sys.stderr)
|
print(file=sys.stderr)
|
||||||
print('Wrote {} bytes'.format(bytes), file=sys.stderr)
|
print('Wrote {} bytes'.format(bytes), file=sys.stderr)
|
||||||
|
|
|
@ -153,7 +153,7 @@ DHCP=%s
|
||||||
# check iface state and IP 6 address; FIXME: we need to wait a bit
|
# check iface state and IP 6 address; FIXME: we need to wait a bit
|
||||||
# longer, as the iface is "configured" already with IPv4 *or*
|
# longer, as the iface is "configured" already with IPv4 *or*
|
||||||
# IPv6, but we want to wait for both
|
# IPv6, but we want to wait for both
|
||||||
for timeout in range(10):
|
for _ in range(10):
|
||||||
out = subprocess.check_output(['ip', 'a', 'show', 'dev', self.iface])
|
out = subprocess.check_output(['ip', 'a', 'show', 'dev', self.iface])
|
||||||
if b'state UP' in out and b'inet6 2600' in out and b'inet 192.168' in out:
|
if b'state UP' in out and b'inet6 2600' in out and b'inet 192.168' in out:
|
||||||
break
|
break
|
||||||
|
@ -558,7 +558,7 @@ exec $(systemctl cat systemd-networkd.service | sed -n '/^ExecStart=/ { s/^.*=//
|
||||||
'--service-type=notify', script])
|
'--service-type=notify', script])
|
||||||
|
|
||||||
# wait until devices got created
|
# wait until devices got created
|
||||||
for timeout in range(50):
|
for _ in range(50):
|
||||||
out = subprocess.check_output(['ip', 'a', 'show', 'dev', self.if_router])
|
out = subprocess.check_output(['ip', 'a', 'show', 'dev', self.if_router])
|
||||||
if b'state UP' in out and b'scope global' in out:
|
if b'state UP' in out and b'scope global' in out:
|
||||||
break
|
break
|
||||||
|
|
|
@ -308,7 +308,7 @@ class SysvGeneratorTest(unittest.TestCase):
|
||||||
err, results = self.run_generator()
|
err, results = self.run_generator()
|
||||||
self.assertEqual(list(results), ['foo.service'])
|
self.assertEqual(list(results), ['foo.service'])
|
||||||
self.assertEqual(os.readlink(os.path.join(self.out_dir, 'foo\\x2b.service')),
|
self.assertEqual(os.readlink(os.path.join(self.out_dir, 'foo\\x2b.service')),
|
||||||
'foo.service')
|
'foo.service')
|
||||||
self.assertNotIn('Overwriting', err)
|
self.assertNotIn('Overwriting', err)
|
||||||
|
|
||||||
def test_same_provides_in_multiple_scripts(self):
|
def test_same_provides_in_multiple_scripts(self):
|
||||||
|
|
Loading…
Reference in a new issue