Skip to content

Commit 6f394cc

Browse files
committed
Remove dead code from
new_content.py
1 parent 0237ccd commit 6f394cc

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

contentctl/actions/new_content.py

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

113-
114-
115-
def writeObjectNewContent(self, object: dict, subdirectory_name: str, type: NewContentType) -> None:
116-
if type == NewContentType.detection:
117-
file_path = os.path.join(self.output_path, 'detections', subdirectory_name, self.convertNameToFileName(object['name'], object['tags']['product']))
118-
output_folder = pathlib.Path(self.output_path)/'detections'/subdirectory_name
119-
#make sure the output folder exists for this detection
120-
output_folder.mkdir(exist_ok=True)
121-
122-
YmlWriter.writeDetection(file_path, object)
123-
print("Successfully created detection " + file_path)
124-
125-
elif type == NewContentType.story:
126-
file_path = os.path.join(self.output_path, 'stories', self.convertNameToFileName(object['name'], object['tags']['product']))
127-
YmlWriter.writeStory(file_path, object)
128-
print("Successfully created story " + file_path)
129-
130-
else:
131-
raise(Exception(f"Object Must be Story or Detection, but is not: {object}"))
132-

0 commit comments

Comments
 (0)