]> git.parisson.com Git - deefuzzer.git/commitdiff
fix path
authorGuillaume Pellerin <guillaume.pellerin@free.fr>
Mon, 5 Feb 2024 15:54:12 +0000 (16:54 +0100)
committerGuillaume Pellerin <guillaume.pellerin@free.fr>
Mon, 5 Feb 2024 15:54:23 +0000 (16:54 +0100)
deefuzzer/tools/utils.py

index 740671010731e2273ae278ab435123949fae9b52..b5728a05e081de301ea4cd0fda4d12fff354059a 100644 (file)
@@ -84,25 +84,25 @@ def replace_all(option, repl):
     return option
 
 
-def get_conf_dict(file):
+def get_conf_dict(path):
     filename, ext = os.path.splitext(path)
 
     # Do the type check first, so we don't load huge files that won't be used
     if 'xml' in ext:
-        confile = open(file, 'r')
+        confile = open(path, 'r')
         data = confile.read()
         confile.close()
         return xmltodict(data, 'utf-8')
 
     elif 'yaml' in ext or 'yml' in ext:
         import yaml
-        confile = open(file, 'r')
+        confile = open(path, 'r')
         conf = yaml.safe_load(confile)
         return conf
 
     elif 'json' in ext:
         import json
-        confile = open(file, 'r')
+        confile = open(path, 'r')
         data = confile.read()
         confile.close()
         return json.loads(data)