Skip to content

Commit 334062c

Browse files
pyth0n1cljstella
authored andcommitted
Remove dead code from
new_content.py
1 parent b794d15 commit 334062c

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

contentctl/actions/new_content.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,3 @@ def execute(self, input_dto: new) -> None:
148148
full_output_path = input_dto.path / subdirectory / SecurityContentObject_Abstract.contentNameToFileName(content_dict.get('name'))
149149
YmlWriter.writeYmlFile(str(full_output_path), content_dict)
150150

151-
def writeObjectNewContent(self, object: dict, subdirectory_name: str, type: NewContentType) -> None:
152-
if type == NewContentType.detection:
153-
file_path = os.path.join(self.output_path, 'detections', subdirectory_name, self.convertNameToFileName(object['name'], object['tags']['product']))
154-
output_folder = pathlib.Path(self.output_path)/'detections'/subdirectory_name
155-
# make sure the output folder exists for this detection
156-
output_folder.mkdir(exist_ok=True)
157-
158-
YmlWriter.writeDetection(file_path, object)
159-
print("Successfully created detection " + file_path)
160-
161-
elif type == NewContentType.story:
162-
file_path = os.path.join(self.output_path, 'stories', self.convertNameToFileName(object['name'], object['tags']['product']))
163-
YmlWriter.writeStory(file_path, object)
164-
print("Successfully created story " + file_path)
165-
166-
else:
167-
raise(Exception(f"Object Must be Story or Detection, but is not: {object}"))

0 commit comments

Comments
 (0)