Tidy up a few broken datastore paths

This commit is contained in:
Leigh Morresi
2021-02-12 19:43:05 +01:00
parent 9f964b6d3f
commit 93ee65fe53
6 changed files with 75 additions and 56 deletions

View File

@@ -20,7 +20,10 @@ class perform_site_check():
return
def ensure_output_path(self):
os.mkdir(self.output_path)
try:
os.mkdir(self.output_path)
except FileExistsError:
print (self.output_path, "already exists.")
def save_response_stripped_output(self, output, fname):
@@ -40,7 +43,7 @@ class perform_site_check():
"last_checked": timestamp
}
self.output_path = "/datastore/{}".format(uuid)
self.output_path = "{}/{}".format(self.datastore.datastore_path,uuid)
self.ensure_output_path()
extra_headers = self.datastore.get_val(uuid, 'headers')