This commit is contained in:
Erik Frojdh
2020-09-03 17:20:38 +02:00
parent 89f0479318
commit 47da2540af
2 changed files with 66 additions and 21 deletions

View File

@ -107,4 +107,12 @@ def make_string_path(path):
elif isinstance(path, str):
return os.path.expanduser(path)
else:
raise ValueError("Cannot convert argument to posix path")
raise ValueError("Cannot convert argument to posix path")
def set_using_dict(func, args):
if isinstance(args, dict):
for key, value in args.items():
func(value, [key])
else:
func(args)