Skip to content

Commit 549870c

Browse files
author
Jonathan Goetzinger
committed
dictionary_functions: do not count delimiters
Do not count delimiters to check if the line contains one or more delimiters. Signed-off-by: Jonathan Goetzinger <[email protected]>
1 parent 62bbd0c commit 549870c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

labgridhelper/dictionary_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def split_output_to_dict(command_protocoll, command, delimiter="=", strip_chars=
1515
output_dict = {}
1616
for line in command_output:
1717
try:
18-
if line.count(delimiter) >= 1: # lines without a delimiter are ignored
18+
if delimiter in line: # lines without a delimiter are ignored
1919
(key, value) = line.split(delimiter, 1)
2020
output_dict[key.strip(strip_chars)] = value.strip(strip_chars)
2121
except ValueError:

0 commit comments

Comments
 (0)