mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-06 01:52:29 +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:
1 file changed
+2
-1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user