plug.py: use copy.deepcopy() instead of dict() in cqc_callback

To create deepcopy for passing data to cqc_callback
This commit is contained in:
norohind committed 2021-08-10 15:55:14 +03:00
1 parent 42ce2ad414
commit 7b39b0fda0
1 file changed
+2 -1
+2 -1
View File
@@ -1,6 +1,7 @@
"""
Plugin hooks for EDMC - Ian Norton, Jonathan Harris
"""
import copy
import importlib
import logging
import operator
@@ -328,7 +329,7 @@ def notify_journal_entry_cqc(cmdr, is_beta, entry, state):
if cqc_callback is not None and callable(cqc_callback):
try:
# Pass a copy of the journal entry in case the callee modifies it
newerror = cqc_callback(cmdr, is_beta, dict(entry), dict(state))
newerror = cqc_callback(cmdr, is_beta, copy.deepcopy(entry), copy.deepcopy(state))
error = error or newerror
except Exception: