Skip to content

Commit 6ba8e10

Browse files
committed
fixup: satisfy flake8 (actually good points)
Signed-off-by: Matthias Büchse <[email protected]>
1 parent ee11fe3 commit 6ba8e10

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Tests/iaas/scs_0101_entropy/entropy_check.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#!/usr/bin/env python3
2-
from collections import Counter, defaultdict
32
import logging
4-
import os
53
import re
6-
import sys
74
import time
85

6+
import openstack
7+
98

109
logger = logging.getLogger(__name__)
1110

@@ -336,7 +335,7 @@ def _convert_to_collected(lines, marker=MARKER):
336335
# removing any "indent", stuff that looks like '[ 70.439502] cloud-init[513]: '
337336
section = None
338337
indent = 0
339-
collected = defaultdict(list)
338+
collected = {}
340339
for line in lines:
341340
idx = line.find(marker)
342341
if idx != -1:
@@ -346,7 +345,7 @@ def _convert_to_collected(lines, marker=MARKER):
346345
indent = idx
347346
continue
348347
if section:
349-
collected[section].append(line[indent:])
348+
collected.setdefault(section, []).append(line[indent:])
350349
return collected
351350

352351

0 commit comments

Comments
 (0)