Skip to content

Commit 8ff1586

Browse files
committed
fix: remove redundant import of pickle in function_code.py
1 parent 48899d5 commit 8ff1586

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/common/util/function_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def exec_code(self, code_str, keywords):
4949
_exec_code = f"""
5050
try:
5151
import os
52+
import pickle
5253
env = dict(os.environ)
5354
for key in list(env.keys()):
5455
if key in os.environ and (key.startswith('MAXKB') or key.startswith('POSTGRES') or key.startswith('PG')):
@@ -61,7 +62,6 @@ def exec_code(self, code_str, keywords):
6162
for local in locals_v:
6263
globals_v[local] = locals_v[local]
6364
exec_result=f(**keywords)
64-
import pickle
6565
with open({result_path!a}, 'wb') as file:
6666
file.write(pickle.dumps({success}))
6767
except Exception as e:

0 commit comments

Comments
 (0)