mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-06 15:28:28 +01:00
summon: prevent modifying the yaml args
This commit is contained in:
+4
-2
@@ -1,6 +1,7 @@
|
||||
import importlib
|
||||
import os
|
||||
import sys
|
||||
import copy
|
||||
from contextlib import contextmanager
|
||||
from voluptuous import Schema
|
||||
|
||||
@@ -124,11 +125,12 @@ def summon(name, fname=None, args=None, repo=None, rev=None):
|
||||
|
||||
with _chdir_and_syspath(_repo.root_dir):
|
||||
call = _import_string(_summon.get("call"))
|
||||
_args = copy.deepcopy(_summon["args"])
|
||||
|
||||
if args:
|
||||
_summon.get("args").update(args)
|
||||
_args.update(args)
|
||||
|
||||
result = call(**_summon.get("args"))
|
||||
result = call(**_args)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user