mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 16:36:53 +08:00
fix(command): ensure command data isolation by using deepcopy
This commit is contained in:
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
|
import copy
|
||||||
import threading
|
import threading
|
||||||
import traceback
|
import traceback
|
||||||
from typing import Any, Union, Dict, Optional
|
from typing import Any, Union, Dict, Optional
|
||||||
@@ -303,7 +304,7 @@ class Command(metaclass=Singleton):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# 命令
|
# 命令
|
||||||
cmd_data = command['data'] if command.get('data') else {}
|
cmd_data = copy.deepcopy(command['data']) if command.get('data') else {}
|
||||||
args_num = ObjectUtils.arguments(command['func'])
|
args_num = ObjectUtils.arguments(command['func'])
|
||||||
if args_num > 0:
|
if args_num > 0:
|
||||||
if cmd_data:
|
if cmd_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user