Skip to content

Commit

Permalink
klippy: Fixup dictionary parameter parsing.
Browse files Browse the repository at this point in the history
mcu: Fixup using of multiple controller dictionaries.

Uneeded spliting of dictionary parameter value by '=' symbol removed.
Wrong naming of additional mcu dictionary file fixed.

Signed-off-by: BlitzKrieg <[email protected]>
  • Loading branch information
Lebensgefahr committed Dec 10, 2024
1 parent b7233d1 commit 4474acf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions klippy/klippy.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ def import_test():

def arg_dictionary(option, opt_str, value, parser):
key, fname = "dictionary", value
if '=' in value:
mcu_name, fname = value.split('=', 1)
key = "dictionary_" + mcu_name
if parser.values.dictionary is None:
parser.values.dictionary = {}
parser.values.dictionary[key] = fname
Expand Down
2 changes: 1 addition & 1 deletion klippy/mcu.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ def _connect_file(self, pace=False):
dict_fname = start_args.get('dictionary')
else:
out_fname = start_args.get('debugoutput') + "-" + self._name
dict_fname = start_args.get('dictionary_' + self._name)
dict_fname = start_args.get('dictionary') + "-" + self._name
outfile = open(out_fname, 'wb')
dfile = open(dict_fname, 'rb')
dict_data = dfile.read()
Expand Down

0 comments on commit 4474acf

Please sign in to comment.