We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4ee197 commit 64eca91Copy full SHA for 64eca91
lib/helpers/file_helper.py
@@ -8,7 +8,7 @@ def __init__(self, output_file):
8
9
def check_directory(self):
10
directory = os.path.dirname(self.output_file)
11
-
+
12
try:
13
os.stat(directory)
14
except:
@@ -18,7 +18,7 @@ def check_directory(self):
18
# placeholder for error checking on -oJ implementation
19
def is_json(json_file):
20
21
- with open(json_file, "r") as f:
+ with open(json_file, "r") as f:
22
json_object = json.load(f)
23
except ValueError:
24
return False
@@ -27,7 +27,7 @@ def is_json(json_file):
27
def write_file(self, contents):
28
# check if host directory exists, if not create it
29
self.check_directory()
30
31
with open(self.output_file, "w") as o:
32
o.write(contents)
33
0 commit comments