mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-18 16:03:12 +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:
parent
42ce2ad414
commit
7b39b0fda0
3
plug.py
3
plug.py
@ -1,6 +1,7 @@
|
|||||||
"""
|
"""
|
||||||
Plugin hooks for EDMC - Ian Norton, Jonathan Harris
|
Plugin hooks for EDMC - Ian Norton, Jonathan Harris
|
||||||
"""
|
"""
|
||||||
|
import copy
|
||||||
import importlib
|
import importlib
|
||||||
import logging
|
import logging
|
||||||
import operator
|
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):
|
if cqc_callback is not None and callable(cqc_callback):
|
||||||
try:
|
try:
|
||||||
# Pass a copy of the journal entry in case the callee modifies it
|
# 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
|
error = error or newerror
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user