1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 01:22:19 +03:00

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 2021-08-10 15:55:14 +03:00
parent 42ce2ad414
commit 7b39b0fda0
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1

@ -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: